24.04.2017, 13:39
Quote:
use an array, or otherwise, simply do not keep a reference to them outside of your for/each loop.
|
PHP Code:
var GangZone = {
'array' : [
SanMap.getLatLngFromPos(1849.3774, -1054.2593),
SanMap.getLatLngFromPos(2069.4177, -1054.2593),
SanMap.getLatLngFromPos(2069.4177, -945.2972),
SanMap.getLatLngFromPos(1849.3774, -945.2972)],
'first' : [
SanMap.getLatLngFromPos(2069.4177, -1108.9666),
SanMap.getLatLngFromPos(2175.5276, -1108.9666),
SanMap.getLatLngFromPos(2175.5276, -945.2972),
SanMap.getLatLngFromPos(2069.4177, -945.2972),
]
};
var polygon1 = new ******.maps.Polygon({
path: GangZone['array','first'],
strokeColor: '#FF0000',
strokeOpacity: 1.0,
strokeWeight: 1,
map: map
});
zone.setMap(map);