[GIS] How to add a background map to a java project

geotoolsjavaopenstreetmappostgis

I'm new at GIS. I am trying to make a java application that can display a map with certain points. I have achieved this using the geotools library. However, I want to put the map from OpenStreetMap or Google Streets in the background also. I already know that PostGIS can be used with GeoTools. However I don't know where to start. How is the best way to start once I have installed PostGIS?

Hello, I have also come across KML. I'm sorry I'm a beginner. What KML parsing mean, and how can I use this to show a map in my Java Application?

Best Answer

You'll need to add a WMS layer for your background map. The GeoTools tutorial has sections on adding WMS layers and querying databases (Example uses a PostGIS database). You might want to check them out.

Related Question