OpenSeaMap Forum

New registrations / Neue Registrierungen

Please create and activate an account. Afterwards send an email to forum@openseamap.eu including a short message and your username to get write access to this forum. Thanks!

Bitte erstelle einen neuen Account und schalte ihn frei. Anschließend sende eine kurze Mail mit deinem Nutzernamen an forum@openseamap.eu um Schreibzugriff für dieses Forum zu bekommen. Danke!

Maintenance window / Wartungsfenster

This server undergoes periodic maintenance and will be unavailable for a few minutes between 00:00 UTC and 01:30 UTC at the first day of the month. New posts during that time could potentially be lost.

Dieser Server wird regelmäßig gewartet und ist deshalb für einige Minuten zwischen 00:00 UTC und 01:30 UTC am Monatsanfang nicht erreichbar. Es kann sein, dass in dieser Zeit erstellte Beiträge verloren gehen.

You are not logged in.

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

victork
Member
Registered: 2012-11-05
Posts: 2

How to create offline maps for android/mapsforge

There is a mapping lib for android from  mapsforge http://code.google.com/p/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 -->
    <pois>
        <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" />       
    </pois>

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>
         <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" />
         </rule>
      </rule>
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.
Regards

Victor

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman