Skip to content
Advertisement

Leaflet Change the circle radius in real time

I would like to change the size of the circle when selecting a value in the dropdown menu. I can change the size of the circle by pressing enter again in the search bar but I want to do it automaticaly when selecting a new value.

I thought about emulate the enter key (folowing this : jquery (or pure js) simulate enter key pressed for testing) in the input box but I wasn’t able to make it work. Maybe someone have a better idea?

My code :

JavaScript

Advertisement

Answer

Solution:

You can add a change listener and then change the radius with geoCircle.setRadius(value)

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement