We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My map using many marker and polygon. When I start measure tool I can not start or click on polygon or marker.
I can not publish my app.
this is my map option
var myOptions = { zoom:zoom, minZoom: wpgmza_max_zoom, maxZoom: wpgmza_min_zoom, center: latLng, draggable: wpgmza_settings_map_draggable, disableDoubleClickZoom: wpgmza_settings_map_clickzoom, scrollwheel: wpgmza_settings_map_scroll, zoomControl: wpgmza_settings_map_zoom, panControl: wpgmza_settings_map_pan, mapTypeControl: wpgmza_settings_map_type, streetViewControl: wpgmza_settings_map_streetview, mapTypeId: google.maps.MapTypeId.ROADMAP, scaleControl: true, };
this is callback
measureTool = new MeasureTool(this.map, { unit: MeasureTool.UnitTypeId.METRIC, contextMenu: false, }); measureTool.addListener('measure_change',(e)=>{ var typeMea = jQuery('#measure_tool_type').val(); var result = e.result; console.log(result); if(typeMea == 'distance' && result.length > 0){ jQuery('.current-measurement').empty(); jQuery('.current-measurement').append('<p>'+result.lengthText+'</p>'); } if(typeMea == 'area' && result.area > 0){ jQuery('.current-measurement').empty(); var areaConver = result.area*0.000247105; jQuery('.current-measurement').append('<p>'+result.areaText+'</p><p>'+areaConver.toFixed(2)+' acre</p>'); } });
Please help #me.
The text was updated successfully, but these errors were encountered:
Please use this template to reproduce the issue you have to help with trouble-shooting. Thanks.
Sorry, something went wrong.
I don't understand. What line is important in that template.
or I need add addListener after add marker or Pogylon
https://jsbin.com/kuyenu/edit?html,output This is not working. You can see RED BOX is polygon
Thank you for quick reply
This is an expected behavior. You should use the callback event to toggle the clickable setting on your google geometries.
Here is an example:
measureTool.addListener('measure_start', function() { polygon.setOptions({clickable: false}); }); measureTool.addListener('measure_end', function() { polygon.setOptions({clickable: true}); });
https://jsbin.com/gotatoxifa/5/edit?html,output
Thank you so much. It is working fine now. You are genuis
zhenyanghua
No branches or pull requests
My map using many marker and polygon. When I start measure tool I can not start or click on polygon or marker.
I can not publish my app.
this is my map option
this is callback
Please help #me.
The text was updated successfully, but these errors were encountered: