I just want to add a layer that represents a city with its city districts. When the user clicks on a district, the site fires an alert presenting the population number. It looks like that:


However, it doesn't work. I also upload a picture of my javascript code: enter image description here

Obviously, I missed something, but I don't find the problem. Can someone help me? Here is also the GeoJSON file if it's useful.


closed as off-topic by Ian Turton Mar 24 at 11:59

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – Ian Turton
If this question can be reworded to fit the rules in the help center, please edit the question.

  • please post the text of your code not a picture – Ian Turton Mar 24 at 11:59

Browse other questions tagged or ask your own question.