fixed set with map issue
rodzic
f0bda2e008
commit
e3a5de9fdb
|
@ -397,12 +397,12 @@ function parseCSV(lines) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawPolygon(points, gmap_object) {
|
function drawPolygon(points, gmap_object) {
|
||||||
var newPoly = new google.maps.Polygon({
|
var newPoly = new google.maps.Polyline({
|
||||||
paths: points,
|
path: points,
|
||||||
strokeColor: "#FF0000",
|
strokeColor: "#FF0000",
|
||||||
strokeOpacity: 0.4,
|
strokeOpacity: 0.4,
|
||||||
fillColor: "#FFFFFF",
|
//fillColor: "#FFFFFF",
|
||||||
fillOpacity: 0,
|
//fillOpacity: 0,
|
||||||
strokeWeight: 2
|
strokeWeight: 2
|
||||||
});
|
});
|
||||||
map_items['delta_square'] = newPoly;
|
map_items['delta_square'] = newPoly;
|
||||||
|
@ -442,7 +442,8 @@ function drawDeltaSquare(map) {
|
||||||
new google.maps.LatLng(lat+dlat, lon+dlon),
|
new google.maps.LatLng(lat+dlat, lon+dlon),
|
||||||
new google.maps.LatLng(lat-dlat, lon+dlon),
|
new google.maps.LatLng(lat-dlat, lon+dlon),
|
||||||
new google.maps.LatLng(lat-dlat, lon-dlon),
|
new google.maps.LatLng(lat-dlat, lon-dlon),
|
||||||
new google.maps.LatLng(lat+dlat, lon-dlon)
|
new google.maps.LatLng(lat+dlat, lon-dlon),
|
||||||
|
new google.maps.LatLng(lat+dlat, lon+dlon)
|
||||||
]
|
]
|
||||||
// write the poly to the map
|
// write the poly to the map
|
||||||
drawPolygon(points, map);
|
drawPolygon(points, map);
|
||||||
|
@ -466,8 +467,7 @@ function setLatLonByClick(state) {
|
||||||
// check this listener doesn't already exist
|
// check this listener doesn't already exist
|
||||||
if (!clickListener) {
|
if (!clickListener) {
|
||||||
appendDebug("Enabling the set with click listener");
|
appendDebug("Enabling the set with click listener");
|
||||||
clickListener = google.maps.event.addListener(map,
|
clickListener = google.maps.event.addListener(map, 'click', function(event) {
|
||||||
'click', function(event) {
|
|
||||||
appendDebug("Got a click from user, setting values into form");
|
appendDebug("Got a click from user, setting values into form");
|
||||||
$("#error_window").fadeOut();
|
$("#error_window").fadeOut();
|
||||||
setFormLatLon(event.latLng);
|
setFormLatLon(event.latLng);
|
||||||
|
|
Ładowanie…
Reference in New Issue