0

I'm new to Carto VL and html, and could use some help. I'm currently building a map using Carto VL and want to implement a search feature that allows users to type in a location and have the map zoom to that location. How can I go about doing this?

2
  • Are you trying to search for any location or a location you have stored in a map dataset? – ramiroaznar Oct 6 '20 at 8:19
  • I want users to be able to search any location – user169554 Oct 7 '20 at 19:12
0

CARTO does not have an out of the box search box. On the one hand, you could build one using Airship input component in combination of CARTO's Data Services API (you will need to work a lot if you select this option), or even better, a proper open source geocode. The result should be a geojson or geometry which you can center and zoom in on it. On the other, you can use something already build such as Mapbox GL geocoder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.