-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_reader.php
52 lines (33 loc) · 1.06 KB
/
data_reader.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<div id=json></div>
<!-- paste here your html -->
<div id=html_insert>
<div class="map-post">
</div>
</div>
<!-- end html -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).ready(function(){
$( "#html_insert" ).hide();
console.log("Data Reader started...");
$( "#json" ).append("[ <br>");
var len = $( ".marker-on-map" ).length;
$( ".marker-on-map" ).each(function( index ) {
var x = this.style.top.substring(0, 5).replace(/%/g,'');
var y = this.style.left.substring(0, 5).replace(/%/g,'');
console.log(index + ": " + "(" + x + "/" + y + ")");
var line = '';
line += ' { <br>';
line += ' "index": ' + index + ', <br>';
line += ' "x": ' + x + ', <br>';
line += ' "y": ' + y + ' <br>';
line += ' }';
if (index != len - 1) {
line += ',';
}
line += ' <br>';
$( "#json" ).append(line);
});
$( "#json" ).append("] <br>");
});
</script>