1

I've tried so many ways to do it but is there a way to do this or not?

I would like to have it so that the user can search on the page (doesn't have to be a control in Leaflet) for a building with values of departments within it from a JSON/GeoJSON array. Ideally, when the user enters the information, it doesn't have to be perfectly spelled and it will return a value and possibly pan to the polygon that the user selects.

I can also make this outside of the map but I'd like it to return all values within a table. I know I need to append the table but I haven't found a good example of how to do that. I have a piece of my array for reference.

var data = {'pois: [{
    "Building":"Science Building",
    "Colleges": "None",
    "Departments": "Biology, Chemistry, and Physics",
    "Offices/Other": "None"
    }]

I'm still relatively new to Leaflet and JavaScript.

1
  • You might need to provide more information on what you have done so far. I have a Leaflet site with a search function built in (using Leaflet-Search) - you may want to look at the code and get some ideas - maps.ozultimate.com (the code is also on GitHub) Mar 30, 2023 at 11:03

0

Browse other questions tagged or ask your own question.