This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

thousands of markers, pop-up on click

0

I'm looking to use openstreetmap. I'm wrting a program in java, with most likely the sprintboot framework and I will be using the OpenStreetMap API. I have a database with roughly 6000 locations(consisting of longitude and latitude coordinates) at which species of animals were observed. I would like to plot all these locations and if a user click a marker, I want to show additional information, maybe in a pop-up box (location name, species, date, etc.). Is this all possible with OpenStreetMap?

asked 22 Feb '21, 10:43

mapijs's gravatar image

mapijs
11223
accept rate: 0%


One Answer:

1

This has nothing to do with OpenStreetMap (which you would only use as a background map). If this were a web project I'd say you need some sort of clustering, WMS or vectortile technology for the browser to handle that number of elements but if you do it in Java it might be possible to actually show all locations. You will want to use some sort of library so that you don't need to reinvent the wheel. Check out https://wiki.openstreetmap.org/wiki/JMapViewer (including the alternative links at the bottom).

answered 22 Feb '21, 12:06

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Source code available on GitHub .