L
L
lukoie2019-06-28 19:32:14
JavaScript
lukoie, 2019-06-28 19:32:14

How to display a polygon on an already initiated Google Maps map?

If anyone has worked with google maps, tell me how to do it.
I have a google map and an input. A person enters a street and a house into the input, and he is shown a pin where he is. It is necessary to draw two polygons on the map. So a person will be able to see whether his address enters the polygon (delivery zone) or not.
The pin output to the address works.
Output polygons also works.
But if I display polygons on an already initiated map, then the functionality with the pin stops working. Apparently because the map is being re-generated?
How to properly implement this task?
https://jsfiddle.net/lukoie/y7sf6dkt/3/

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question