Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>

Join the forum, it's quick and easy

Visit the new forum: <a href="http://www.oruxmaps.com/foro">OruxMaps</a>
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Baidu (chinese) offline maps (MOBAC + OruxMaps tweaks)

Go down

Baidu (chinese) offline maps (MOBAC + OruxMaps tweaks) Empty Baidu (chinese) offline maps (MOBAC + OruxMaps tweaks)

Post  yip Sat Jan 26, 2013 2:55 am

No, it does not work, sorry.
study Below is some technical tweaks that may be a beginning of something. scratch

It is an attempt to read offline Baidu maps (map.baidu.com) in mobac and oruxmaps.

-Offline maps, with wrong coordinates
-No positionning possible.
-Not Reliable at all.
-the scale is wrong

-MOBAC > 1.9.8
-Mobac Google-map map sources (or another reliable source)
-Oruxmaps of course Wink

Here is the map source to put in mobac subdirectory mapsources:
create a file named baidu.xml with this contents:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <name>Baidu CN TEST</name>
            <name>Baidu CN source</name>
            <serverParts>1 2 3 4 5 6 7 8</serverParts>

-start Mobac.
-Load the new Baidu CN TEST
-zoom-out to world map, yes it's weird.

Now here is what I do to have slightly better positionning of the Baidu maps:

Easy&Dirty way:
-Make two maps at the same time, one Baidu, one Googlemap, with the same layers and the same visual area.
visual because the Baidu source is not positionned correctly, it is needed to re-make the selection with the false coordinates.

-open the two OruxMap files otrk2.xml side by side and copy&replace all the lines like that in the baidu file (example):

<MapBounds minLat="36.597889133070225" maxLat="52.48278022207823" minLon="84.375" maxLon="123.75" />
<CalibrationPoint corner="TL" lon="84.375000" lat="52.482780" />
<CalibrationPoint corner="BR" lon="123.750000" lat="36.597889" />
<CalibrationPoint corner="TR" lon="123.750000" lat="52.482780" />
<CalibrationPoint corner="BL" lon="84.375000" lat="36.597889" />
by their counterpart int the googlemap file. there is one paragraph for each zoomlevel.

That's it. and that's dirty. really dirty.
With this workaround, HongKong can be in place of Shangai.
But without this workaround, HK is in Antarctica. No

Complex&Dirty Way:
To be tested.
in mobac,right-click each layer of Baidu, "zoom to MapBounding box"
With Oruxmaps w/ Googlemaps on your phone in hand, write down the approx coordinates of each corner and their associated zoomlevel. Locate the true coordinates on the phone, not in mobac.
The final precision depends on this tedious step.
( it is also possible to do it by taking screenshots)
edit the XML file above by hand , with the correct coordinates.

If you have any info of the way Baidu Maps works, please feel free to post. I constructed the XML source without much knowledge of the URL parameters. Info on Internet is scarce. If this post help, please drop a note.thx.


-Baidu zoomlevels are not the same as google ones, ie Baidu zoom 11 is comparable (not equal) to google zoom 10
-Baidu tiles grid does not match Google tiles grid, that's why "zoomToMapBoundingBox" above is necessary
-Lattitude needs to be inverted , that's why China is in Antarctica I think.


Cantidad de envíos : 40
Fecha de inscripción : 2012-01-21

Back to top Go down

Baidu (chinese) offline maps (MOBAC + OruxMaps tweaks) Empty Re: Baidu (chinese) offline maps (MOBAC + OruxMaps tweaks)

Post  yip Mon Mar 25, 2013 1:44 pm

With Oruxmaps > 2.5.4
Put the following code in onlinemapsources.xml

     <onlinemapsource uid="88">
      <name>Baidu China</name>
        <!-- GPS positionning is 27.9145N and 20.6175E off -->
        <!-- Distance is wrong -->
      <httpparam name=""></httpparam>

-positionning is wrong, but can be corrected with offline maps.
-Distance calculation is wrong and will probably always be No due to zoomlevels being differents

Currently, The map is 3300km in the South-West of where it should be.
That is, a correction of 27.9145E and 20.6175N needs to be applied.


Cantidad de envíos : 40
Fecha de inscripción : 2012-01-21

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum