Menu

Aggregating 2 OpenAndroMaps

Barbudor
2024-06-19
2024-06-22
  • Barbudor

    Barbudor - 2024-06-19

    Hi

    I am using maps from OpenAndroMaps.
    For France, there are 2 maps (north and south) with some overlap. So I have 2 XML mapsources, 1 for each half (see exemple for North below). That is working fine

    Now I would love to be able to create some maps that are across the 2 France maps.
    I tried to combine them using a multilayer XML :

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <customMultiLayerMapSource>
        <name>OAM France</name>
        <layers>
            <mapSource>
                <name>OAM France North</name>
            </mapSource>
            <mapSource>
                <name>OAM France South</name>
            </mapSource>
        </layers>
    </customMultiLayerMapSource>
    

    But that doesn't work
    Would there be a way for achieving that combination?

    Thanks

    My XML for the north map (south is the same but pointing to the south map file):

    <?xml version="1.0" encoding="UTF-8"?>
    <mapsforge>
        <!-- name of the map - as shown in map source list -->
        <name>OAM France North</name>
        <!-- optional -->
        <minZoom>0</minZoom> 
        <!-- optional -->
        <maxZoom>20</maxZoom> 
        <!-- absolute or relative file name -->
        <mapFile>locusmaps/France-North_oam.osm.map</mapFile>
        <!-- optional default OSMARENDERER Theme -->
        <!-- absolute or relative file name -->
        <xmlRenderTheme>locusmaps/Elevate/Elevate_mtb.xml</xmlRenderTheme>
        <transparent>false</transparent>
        <!-- text size scale factor -->
        <textScale>1.0</textScale>
    </mapsforge>
    
     
  • Laurent Grenet

    Laurent Grenet - 2024-06-20

    Only set the two maps defined as

    <transparent>true</transparent>

    in their XML mapsource file and it works.

    PS : Actually, it's enough to define the map of the second layer (South in your case) as transparent

     

    Last edit: Laurent Grenet 2024-06-20
  • Barbudor

    Barbudor - 2024-06-22

    Bonjour Laurent
    Sorry for late feedback, I didn't had a notification
    I tried as per your suggestion

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <customMultiLayerMapSource>
        <name>OAM France</name>
        <layers>
            <mapSource>
                <name>OAM France North</name>
            </mapSource>
            <mapSource>
                <transparent>true</transparent>        
                <name>OAM France South</name>
            </mapSource>
        </layers>
    </customMultiLayerMapSource>
    

    But MoBAC is complaining:

    Failed to load a custom map
    Element inattendu (URI:"", local:"transparent")
    Les elements attendus sont {}name>
    
     
  • Barbudor

    Barbudor - 2024-06-22

    Sorry I read too fast, you meant in the individual map XML
    All good now

    Many thanks 👍

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.