hundeva
hundeva

Reputation: 1058

OpenStreetMap - java library to handle offline map

I need to create an application that would run on a linux system. Basically, I want to achieve something like Google Maps, but with much less functionality. The application needs to be able to do the followings:

I never really developed this kind of an application, I only used Google Maps for android v2, which is quite straight forward, so I wouldn't have any problem, but without internet connection, this isn't an option. So here are my questions:

Also, if you can suggest anything, that would help me, I would be grateful.

Thanks in advance, cheers

Upvotes: 0

Views: 4277

Answers (1)

klm
klm

Reputation: 25

basically you have to follow the following steps:

  • setup a mapnik server load the *.osm file and prerender all tiles you need. (store them in some sort of zip archive as the become pretty big in higher zoomlevels, you also fill unused space in the sectors on your harddrive [tar.gz])
  • write your own class extending from AbstractOsmTileSource to link to the stored data
  • write your own class implementing the TileLoader interface to load required tiles from inside the archive
  • create instance of JMapViewer and set prev defined TileLoader and TileSource
  • add railway as MapPolygon
  • add current position as MapMarker

Upvotes: 2

Related Questions