var map = null; function resize() { var w = document.documentElement.clientWidth; var h = document.documentElement.clientHeight; document.getElementById('myMap').style.width = w + 'px'; document.getElementById('myMap').style.height = h + 'px'; if (map != null) map.Resize(w, h); } function GetMap() { isset(); url_splitter(); map = new VEMap('myMap'); map.SetDashboardSize(VEDashboardSize.Tiny); map.LoadMap(new VELatLong(the_url_lat1[0], the_url_lat1[1]), the_url_lat1[2]); map.AttachEvent("onmouseup", LoadFunc); map.AttachEvent("onendzoom", LoadFunc); LoadFunc(); // AddMyLayer1617(VEDataType.GeoRSS); } function isset() { var first_url = window.location.href; if (first_url == 'http://harta-bucuresti.com.ro/beta/') { window.location.href = 'http://harta-bucuresti.com.ro/beta/#lat=44.4270569&lon=26.1011874&z=17'; } } function url_splitter() { var the_url = window.location.href; if (the_url == 'http://harta-bucuresti.com.ro/beta/') { window.location.href = 'http://harta-bucuresti.com.ro/beta/#lat=44.4270569&lon=26.1011874&z=17'; } the_url_lat1 = the_url.replace('http://harta-bucuresti.com.ro/beta/#lat=',''); the_url_lat1 = the_url_lat1.replace('&lon=',';'); the_url_lat1 = the_url_lat1.replace('&z=',';'); the_url_lat1 = the_url_lat1.split(';'); document.getElementById('app_url').value = the_url_lat1[0] + the_url_lat1[1] + ' test ' + the_url_lat1[2]; } function GetCenterLatLong() { //Check if in Birdseye or Oblique Map Style if (map.GetMapStyle() == VEMapStyle.Birdseye || map.GetMapStyle() == VEMapStyle.BirdseyeHybrid) { //IN Birdseye or Oblique Map Style //Get the BirdseyeScene being displayed var birdseyeScene = map.GetBirdseyeScene(); //Get approximate center coordinate of the map var x = birdseyeScene.GetWidth() / 2; var y = birdseyeScene.GetHeight() / 2; // Get the Lat/Long var center = birdseyeScene.PixelToLatLong(new VEPixel(x,y), map.GetZoomLevel()); // Convert the BirdseyeScene LatLong to a normal LatLong we can use return (new _xy1).Decode(center); } else { // NOT in Birdseye or Oblique Map Style return map.GetCenter(); } } function DisplayCenter() { var center = GetCenterLatLong(); alert("Latitude: " + center.Latitude + "\nLongitude: " + center.Longitude); } function CurrentZoom() { var zl = map.GetZoomLevel(); } ////////////////////////// // Start clustering ///////////////////////// function AddMyLayer1819(type) { var zl = map.GetZoomLevel(); var alt_center = map.GetCenter() + ''; var gxy = alt_center.split(", "); var glat = gxy[0]; var glon = gxy[1]; var l = new VEShapeLayer(); var veLayerSpec = new VEShapeSourceSpecification(type, 'http://harta-bucuresti.com.ro/beta/grss_zl-14-17.php?lat='+glat+'&lon='+glon, l); map.ImportShapeLayerData(veLayerSpec, function() { var numShapes = l.GetShapeCount(); for(var i=0; i< numShapes; ++i) { var s= l.GetShapeByIndex(i); // s.SetCustomIcon(s.IconId); s.SetCustomIcon("