Polyline changes into polygon in google map drawing tool

المشرف العام

Administrator
طاقم الإدارة
I have been using google map provided tools where it can draw the polygon and polyline accordingly. I will first click on the polyline icon and start plotting and suddenly when I double click it turn to be polygon and I notice icon which I clicked earlier have been not in selected mode now. Below is my codes where I do the calling when I do the overlay completed. So where could be my error ?

google.maps.event.addListener(drawingManager, 'overlaycomplete', function(e) { drawingManager.setDrawingMode(null); var newShape = e.overlay; newShape.type = e.type; if(e.type.toString()=="polygon"){ //customised info window } else if(e.type.toString()=="polyline") { //customised info window } else if(e.type.toString()=="marker") { //customised info window } });google.maps.event.addListener(drawingManager, 'drawingmode_changed', clearSelection);

أكثر...
 
أعلى