I'd like some help to do what's in the title. I'll explain:
I have 3 chained selects, where one depends on the other and when choosing the last, for example, I choose option 74. This value 74 is equivalent to some area of the map, so I would like to have a zoom in that area. Which is basically the Leaflet pattern when you click on a map region, for example.
Here is the code:
$("#numSearch").on('change', function(e) {
var value = $(this).find(':selected').val();
//var boundArea = value.target;
//map.fitBounds(boundArea.getBounds());
alert(value);
});
The #numSearch is the last select id where I can get its value and set it to the value variable, however when I try to do all the map.fitBounds (boundArea.getBounds ()); which is precisely the one responsible for the zoom I can not at all. The map does not zoom, could you help me? It's quite complicated, I've tried everything and it's been almost a month since I've had this problem, I'd like it and I really need that help. The complete code is here:
and json is here:
The biggest problem is to understand why I have the value, for example 74 and I can not zoom in area 74 of my map, for example. Please, can anyone help me?