OpenSeaMap Forum

For new registrations: Please create and activate an account. Afterwards send an email to including a short message and your username to get write access to this forum. Thanks!
Für neue Registrierungen: Bitte erstelle einen neuen Account und schalte ihn frei. Anschließend sende eine kurze Mail mit deinem Nutzernamen an um Schreibzugriff für dieses Forum zu bekommen. Danke!

You are not logged in.

#1 2012-11-12 16:45:55

Registered: 2012-11-05
Posts: 2

How to create offline maps for android/mapsforge

There is a mapping lib for android from  mapsforge

They have a mapping-plugin for osmosis to write their compressed .map format to files that can be put on the sd-card.
Normally it is used to create osm-maps, but it can be configured with an additional xml.file to support seamark tags.
Additionally you have to use a render theme, which can render the seamarks.
I have tested it with a small .osm file from Warnemünde in germany and the mapsforge-lib in a testapp for android.
I added some support for lateral buoys to the writer, the render theme and the according symbols to an testapp.

the map-writer plugin config file:
  <!-- Seamap tags -->
        <osm-tag key="seamark:buoy_lateral:colour" value="red" renderable="false" />
        <osm-tag key="seamark:buoy_lateral:colour" value="green" renderable="false" />
        <osm-tag key="seamark:type" value="buoy_lateral" zoom-appear="10" />       

the render theme:
<!-- begin opensea map -->
       <rule e="node" k="seamark:type" v="buoy_lateral">
         <rule e="node" k="seamark:buoy_lateral:colour" v="red">
             <symbol src="jar:/assets/rendertheme/symbols/buoy_red.png"/>
             <caption k="name" dx="+40" dy="+20" font-style="bold" font-size="16" fill="#ec2d2d" stroke="#ffffff" stroke-width="2.0" />
         <rule e="node" k="seamark:buoy_lateral:colour" v="green">
             <symbol src="jar:/assets/rendertheme/symbols/buoy_green.png"/>
             <caption k="name" dx="+40" dy="+20" font-style="bold" font-size="16" fill="#18ec34" stroke="#ffffff" stroke-width="2.0" />
I hope this gives some information about this issue.

I have read the wiki pages which describe the tags with the openseamap tag values.

As I am not an map expert, 
Maybe we can discuss how to enhance the functionality.



Board footer

Powered by FluxBB