Guest User

Untitled

a guest
Apr 24th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. function DrawPoly()
  2. {
  3. //Starts the initial polygon drawing
  4. if(addPoly!=undefined){
  5. map.removeOverlay(addPoly);
  6. addPoly = undefined;
  7. }
  8.  
  9. document.getElementByID("Submit").disabled = false;
  10. document.getElementById("StartPolyButton").disabled = true;
  11.  
  12. //var pclick = GEvent.addListener(map, "click", mapClick);
  13.  
  14. if(!pushHandle)
  15. var pushHandle = GEvent.addListener(map, "click",function(overlay,point){
  16. marker = new GMarker(point,polymarker);
  17. map.addOverlay(marker);
  18. pgMarks.push(marker);
  19. pgArray.push(new GLatLng(point.y(),point.x()));
  20. if((document.getElementById("FinishPolyButton").disabled) &&
  21. (pgArray.length>1))
  22. document.getElemntById("FinishPolyButton").disabled=false;
  23. });
  24. }
Add Comment
Please, Sign In to add comment