meebee
meebee

Reputation: 261

How to create a map in Java Application from OSM Tiles?

I am trying to create a map of one city in my Java Application. I have been able to do this with the Geotools library but only shapefiles have been mapped. I am trying to be able to map OSM data as well. I have already downloaded the OSM tiles needed to create the map. Does anyone know how I can use these tiles to be mapped in my Java App? I have looked into PostGIS but I am only a beginner and it is complicated for me to understand.

Upvotes: 1

Views: 4966

Answers (2)

Open Door Logistics
Open Door Logistics

Reputation: 198

The mapsforge project is a java-based library for drawing OSM maps embedded into applications.

Upvotes: 0

Alex Calugarescu
Alex Calugarescu

Reputation: 848

You should build your stack for osm :

  1. PostGIS
  2. GeoServer
  3. OpenStreerMap in a Box - for data import to PostGIS and Geoserver styles & stuff
  4. GeoTools for rendering and spatial stuff or Open Layers for Web Applications. There is also an Open Layers for GWT library available.

There is a lot of knowledge involved and once you make up your mind on what you want to do I will be happy to answer your further questions (Desktop vs Web App, your own rendering, etc...). You should start by reading the tutorial on how to import your osm data in PostGres, and then try to configure GeoServer to use the imported data (by using the tools provided by the kind guys at OSM in a Box). The you can render your data by using the industry standard WMS/WFS.

Upvotes: 2

Related Questions