source: ntrip/trunk/BNC/src/map/html/tools.js@ 5166

Last change on this file since 5166 was 5164, checked in by mervart, 11 years ago
File size: 1.3 KB
Line 
1function getCurrentPointOfView() {
2 return map.getBounds().getCenter().toUrlValue(6);
3}
4
5function removeMarkers()
6{
7 while(markers.length)
8 markers.pop().setMap(null)
9}
10
11// function appendMarker(jsonObj)
12// {
13// var marker = new google.maps.Marker({
14// position: new google.maps.LatLng( jsonObj.geometry.location.lat, jsonObj.geometry.location.lng ),
15// map: map,
16// title: jsonObj.name,
17// animation: google.maps.Animation.DROP,
18// icon: jsonObj.icon
19// });
20//
21// google.maps.event.addListener(marker, 'click', function() {
22// QtPlaces.markerClicked( jsonObj['reference'] )
23// });
24//
25// markers.push(marker)
26// }
27//
28// function gotoPlace(json, zoom)
29// {
30// map.setCenter( new google.maps.LatLng( json.geometry.location.lat, json.geometry.location.lng ) )
31// map.setZoom(zoom)
32// }
33
34function gotoLocation( lat, lng, zoom )
35{
36 map.setCenter( new google.maps.LatLng( lat, lng ) )
37 map.setZoom(zoom)
38}
39
40function recreateSearchCircle(lat, lng, radius)
41{
42 var searchCircleOptions = {
43 strokeColor: "#000000",
44 strokeOpacity: 0.75,
45 strokeWeight: 1,
46 fillColor: "#000000",
47 fillOpacity: 0.35,
48 map: map,
49 center: new google.maps.LatLng( lat, lng ),
50 radius: radius
51 };
52 searchCircle = new google.maps.Circle(searchCircleOptions);
53}
Note: See TracBrowser for help on using the repository browser.