trafficonese / leaflet.extras

Extra functionality for leaflet R package.
https://trafficonese.github.io/leaflet.extras/
GNU General Public License v3.0
213 stars 74 forks source link

Leaflet map search button NOT work #135

Closed yzjiangyang closed 6 years ago

yzjiangyang commented 6 years ago

"# We need latest leaflet package from Github, as CRAN package is too old. devtools::install_github('rstudio/leaflet') devtools::install_github('bhaskarvk/leaflet.extras')"

Hi, I was able to use these 2 packages to search the markers on the map. Did you update the packages recently? I just installed them on my new computer again, but the search button does not work now. Thank you! qq 20180416021225

schloerke commented 6 years ago

@yzjiangyang do you have a code example?

schloerke commented 6 years ago

Found in the error in code inst/examples/search.R example.

schloerke commented 6 years ago

Ok... good news.

Example is fixed when using circles and not circlemarkers as circlemarkers don't have the method .getBounds(). Makes sense as their width is in pixels... not meters on the map.

I've updated the example in a final PR.

http://leafletjs.com/reference-1.3.0.html#circle-getbounds

schloerke commented 6 years ago

Fixed in #136 Closing

yzjiangyang commented 5 years ago

Hi, @schloerke If use circles, search button works, but after zoom in the map, the points on maps get much bigger. I prefer using circlemarkers, but search button does not work, Will you solve this issue? Thank you