140 lines
9.5 KiB
HTML
140 lines
9.5 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
|
||
|
<head>
|
||
|
<meta charset='utf-8'>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
|
|
||
|
<link rel="stylesheet" src="../libs/OpenLayers/theme/default/style.css" type="text/css">
|
||
|
|
||
|
<script src="js/libs/OpenLayers/OpenLayers.debug.js"></script>
|
||
|
<script type="text/javascript" src="js/libs/jquery-1.11.0.js"></script>
|
||
|
<script type="text/javascript" src="js/libs/underscore.js"></script>
|
||
|
<script type="text/javascript" src="js/libs/backbone.js"></script>
|
||
|
|
||
|
<script type="text/javascript" src="js/models/models.js"> </script>
|
||
|
<script type="text/javascript" src="js/SfmbMapsOL.js"> </script>
|
||
|
<script type="text/javascript" src="js/views/TestView.js"></script>
|
||
|
<script type="text/javascript" src="js/utils/all.js"> </script>
|
||
|
<script type="text/javascript" src="js/tests/TestCommands.js"></script>
|
||
|
|
||
|
|
||
|
<script>
|
||
|
var map;
|
||
|
|
||
|
var vector = '41.4867114974186,15.6601268704981,unit_146,Speed: 18 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5083368076012,15.6808511260897,unit_147,Speed: 15 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4567378116772,15.6314020883292,unit_148,Speed: 4 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5176910115406,15.6898155715317,unit_149,Speed: 18 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5343877626583,15.7058166246861,unit_150,Speed: 29 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.454776446335,15.629522446543,unit_151,Speed: 18 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5050678653643,15.6777183897793,unit_152,Speed: 4 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4833419723436,15.6568977423012,unit_153,Speed: 8 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4279208285734,15.6037858128548,unit_154,Speed: 22 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5177915943787,15.6899119634181,unit_155,Speed: 0 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.530465031974,15.7020573411137,unit_156,Speed: 24 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4715234888718,15.6455716956407,unit_157,Speed: 11 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5178418857977,15.6899601593614,unit_158,Speed: 11 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5237259818241,15.69559908472,unit_159,Speed: 0 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4397393120453,15.6151118595153,unit_160,Speed: 24 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4498478872702,15.6247992441058,unit_161,Speed: 26 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4717749459669,15.6458126753569,unit_162,Speed: 26 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4533179951832,15.6281247641891,unit_163,Speed: 15 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5083870990202,15.6808993220329,unit_164,Speed: 6 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4576430572197,15.6322696153075,unit_165,Speed: 26 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4727304829285,15.6467283982784,unit_166,Speed: 15 mph Time: 06:13<br>Strada del Salice Nuovo Foggia FG Italy,towtruckyellow.png,41.5045146597549,15.6771882344037,unit_167,Speed: 29 mph Time: 06:13<br>SS544 Foggia FG Italy,towtruckyellow.png,41.6236047400162,15.7913162279874,unit_168,Speed: 18 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4282225770876,15.6040749885142,unit_169,Speed: 6 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4937020046636,15.6668261066079,unit_170,Speed: 31 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.475446219556,15.6493309792131,unit_171,Speed: 19 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5405736071989,15.7117447257042,unit_172,Speed: 33 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4183151675388,15.5945803876966,unit_173,Speed: 11 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5741682751104,15.7439396157861,unit_174,Speed: 8 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5038105798885,15.6765134911984,unit_175,Speed: 33 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.4202262414619,15.5964118335396,unit_176,Speed: 22 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.535544465296,15.7069251313806,unit_177,Speed: 0 mph Time: 06:13<br>Retrieving address information ...,towtruckyellow.png,41.5340860141441,15.7055274490267,unit_178,Speed: 24 mph Time: 06:13<b
|
||
|
|
||
|
function initMap() {
|
||
|
|
||
|
map = new SfmbMapsOL($("#Map")[0], null);
|
||
|
|
||
|
|
||
|
|
||
|
//setDataset,vehicles_positions,113.577594361268,-46.591381765902,DANIEL DAVIS 56,Speed: 50 Km/h Time: 08:40,arrow_e.png
|
||
|
map.putPoints([{latitude:44.110295, longitude:24.992266, id:"David", speed_time:"speespeedspee<br>dspeedspeedspeedspeedspeedspee<br>dspeedspeedspeedspeedspeedd", icon:"arrow_e.png"}]);
|
||
|
|
||
|
map.openInfoBubble("David")
|
||
|
//map.removeAllPoints();
|
||
|
|
||
|
map.putPoints([{latitude:44.110295, longitude:25.992266, id:"David", description:"speespeedspee<br>dspeedspeedspeedspeedspeedspee<br>dspeedspeedspeedspeedspeedd", icon:"arrow_e.png"}]);
|
||
|
|
||
|
|
||
|
//map.openInfoBubble("David")
|
||
|
|
||
|
var points = vector.split(',');
|
||
|
|
||
|
//var p = Parser._parsePoints(points);
|
||
|
|
||
|
//map.putPoints(p, true);
|
||
|
|
||
|
//map.hideLabels();
|
||
|
|
||
|
//map.showLabels();
|
||
|
|
||
|
//setInterval(function(){map.centerZoom(45, 25, 7)}, 5000);
|
||
|
|
||
|
|
||
|
//setInterval(function(){map.openInfoBubble("David")}, 3000);
|
||
|
//setInterval(function(){map.removePoint({name: "David"})}, 5000);
|
||
|
|
||
|
// map.removeLabels([{id: "David"}]);
|
||
|
|
||
|
map.setPolygon("sudan", "green", [{latitude:34, longitude:32},{latitude:6, longitude:3},{latitude:45, longitude:25}]);
|
||
|
//map.deletePolygon("sudan");
|
||
|
// map.getPolygon("sudan");
|
||
|
|
||
|
//map.changePolygonColor("sudan", "red");
|
||
|
map.newPolygon("blabla", "red");
|
||
|
|
||
|
//map.startEditPolygon("sudan");
|
||
|
|
||
|
//setInterval(function(){ map.endEditPolygon(); }, 10000);
|
||
|
//setInterval(function(){ map.startEditPolygon("sudan"); }, 14000);
|
||
|
|
||
|
//setInterval(function(){ map.resetAll();}, 12000);
|
||
|
|
||
|
|
||
|
setInterval(function(){ map.getPolygon("blabla"); }, 3000);
|
||
|
|
||
|
|
||
|
|
||
|
/*setInterval(function(){ map.newPolygon("blabla2", "blue"); }, 12000);
|
||
|
|
||
|
setInterval(function(){ map.getPolygon("blabla2"); }, 17000);
|
||
|
|
||
|
|
||
|
setInterval(function(){ map.newPolygon("blabla3", "green"); }, 20000);
|
||
|
|
||
|
setInterval(function(){ map.deletePolygon("blabla2"); }, 27000);
|
||
|
|
||
|
*/
|
||
|
|
||
|
//map.setPoly(true, "blue", 0.4, [{latitude:34, longitude:32},{latitude:6, longitude:3},{latitude:45, longitude:25}]);
|
||
|
//map.deletePoly();
|
||
|
|
||
|
//map.removePoint({latitude:45.342, longitude:25.3543, name:"David", speed_time:"speed", icon:"http://www.openlayers.org/dev/img/marker.png"});
|
||
|
/*
|
||
|
map = new OpenLayers.Map({
|
||
|
div: "Map",
|
||
|
|
||
|
|
||
|
//layers: [new OpenLayers.Layer.OSM( "OpenStreetMap", 'http://10.120.1.136/osm_tiles/${z}/${x}/${y}.png')],
|
||
|
layers: [new OpenLayers.Layer.OSM()],
|
||
|
controls: [
|
||
|
new OpenLayers.Control.Navigation({
|
||
|
dragPanOptions: {
|
||
|
enableKinetic: false
|
||
|
}
|
||
|
}),
|
||
|
new OpenLayers.Control.ScaleLine(),
|
||
|
new OpenLayers.Control.PanZoomBar()
|
||
|
],
|
||
|
center:[0, 0],
|
||
|
zoom: 4
|
||
|
|
||
|
|
||
|
}); */
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
|
||
|
<body onload="initMap();">
|
||
|
|
||
|
<div id="Map" style="height:600px; width:800px;"> </div>
|
||
|
|
||
|
|
||
|
|
||
|
<!-- resize -->
|
||
|
<div style="float:left"> Resize:  </div>
|
||
|
<input type="text" id="height" name="height" />
|
||
|
<input type="text" id="width" name="width" />
|
||
|
<input type="button" value="Resize"
|
||
|
onclick="map.resize(document.getElementById('height').value, document.getElementById('width').value);" />
|
||
|
|
||
|
</body>
|
||
|
|
||
|
</html>
|