Search code examples
javagoogle-mapsgisopenstreetmap

Map data java OSM


I'm new to open street maps and GIS. Is there a java API avaliable for Open street maps? From what I can see they are geared towards editing maps, I only want to retrieve data and display it. if I'm understanding it correctly I should: Send a http request Receive XML parse this XMl (somehow?) render this as a map(any library recommendations?)

THanks


Solution

  • Would you be OK with simply showing pre-rendered tiles, or do you need to process the data into some new visualisation format? If the former, you can just grab PNGs from a Tileserver. If the latter, yes you'd query the XML data from something like Overpass, and then it's up to you to parse the XML data and do things with it.

    I find that XSLT is a nice way to specify how to convert the raw XML into a more amenable form (here's a simple OSM XSLT from me).