Menu

Google Satellite XML MOBAC

2022-05-20
2022-10-10
  • Chris Adamski

    Chris Adamski - 2022-05-20

    Hello,

    I'm fairly new to the MOBAC system and have dug in previous posts on this forum and across others - cannot find the answer.

    *How can I link Google Satellite (so there aren't all the labels involved) into MOBAC.

    I found the below xml and it works in MOBAC, but it's Hybrid - so there are the google street and places markers in there. Does anyone happen to have a XML already pre-built or know where I could find one?

    <custommultilayermapsource>
    <name>Google-hybridni-256</name>
    <tiletype>jpg</tiletype>
    <layers>
    <custommapsource>
    <name>Google-satelite-256</name>
    <minzoom>0</minzoom>
    <maxzoom>19</maxzoom>
    <tiletype>jpg</tiletype>
    <tileupdate>None</tileupdate>
    <url>http://mt{$serverpart}.google.com/vt/lyrs=s&x={$x}&y={$y}&z={$z}&scale=1</url>
    <serverparts>0 1 2 3</serverparts>
    <backgroundcolor>#000000</backgroundcolor>
    </custommapsource>
    <custommapsource>
    <name>Google-hybrid-256</name>
    <minzoom>0</minzoom>
    <maxzoom>19</maxzoom>
    <tiletype>png</tiletype>
    <tileupdate>None</tileupdate>
    <url>http://mt{$serverpart}.google.com/vt/lyrs=h&x={$x}&y={$y}&z={$z}&scale=1</url>
    <serverparts>0 1 2 3</serverparts>
    </custommapsource>
    </layers>
    </custommultilayermapsource>

     
  • Laurent Grenet

    Laurent Grenet - 2022-05-20

    What you show us is a multi layers mapsource , with two layers.
    The first one is the satellite, but you add above road names.

    The easiest way to get what you want is to have a mono-source mapsource file.
    For example , in bsh format :

    name = "Google Satellite";
    String Lyrs = "s";
    tileType = "jpg";
    maxZoom = 21;
    
    String[] serverParts = new String[] { "0", "1", "2", "3"};
    
    String getTileUrl( int Zoom, int X, int Y ) {
        String sp = serverParts[X % serverParts.length];
        return "http://mt" + sp + ".google.com/vt/lyrs="+Lyrs+"&hl=fr&x="+X+"&y="+Y+"&z="+Zoom;    
    } 
    

    You can have several variants of this .bsh file, only changing in various variants the parameter
    String Lyrs = "s"
    (and also the name : you cannot have several mapsources with the same name)
    with these values for Lyrs :
    h = roads only 0-22
    m = standard roadmap (Plan) 0-22
    p = terrain = t,r 0-22
    r = somehow altered roadmap 0-22
    s = satellite only 0-21
    t = terrain only 0-22
    y = hybrid = s,r (Earth) 0.21

     
  • Raul

    Raul - 2022-10-10

    Hi, I would like to be able to use google hybrid or satellite with Mobac. Where should I put this .xml?

     
  • Hufkratzer

    Hufkratzer - 2022-10-10

    in the mapsources subdirectory

     

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.