Please Help me. The Online maps can not open.

Bakee shared this problem 2 months ago
Not a Problem

"I encountered a very strange issue with an online tile website. It works perfectly fine on PC apps and other mobile apps, but after modifying the XML file multiple times, I still can't connect using Locus Map 4.20. The XML is as follows. Please help me. Thank you."

<provider id="50001" type="1" visible="true" background="0">
<name>===Test Maps Tile===</name>
<mode>botanicgarden</mode>
<url><![CDATA[https://gmaps.botanicgarden.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}&scale=2]]></url>;
<serverPart>01;02;03</serverPart>
<countries>china</countries>
<zoomPart>{z}-8</zoomPart>
<zoomMin>8</zoomMin>
<zoomMax>30</zoomMax>
<tileSize>512</tileSize>
<tileScale dpi="0" multi="1.0" replace="19" />
<extraHeader><![CDATA[Accept#text/plain, text/html, text/xml, text/xml-external-parsed-entity, application/octet-stream, application/vnd.google-earth.kml+xml, application/vnd.google-earth.kmz, image/*,*/*,image/gif,image/png, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*]]></extraHeader>
<extraHeader><![CDATA[Accept-Language#zh-cn]]></extraHeader>
<extraHeader><![CDATA[Accept-Encoding#gzip, deflate]]></extraHeader>
<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36]]></extraHeader>
<extraHeader><![CDATA[Connection#Keep-Alive]]></extraHeader>
<extraHeader><![CDATA[Proxy-Connection#Keep-Alive]]></extraHeader>

Replies (4)

photo
1

HI,

please follow the instructions described here: https://docs.locusmap.app/doku.php?id=manual:advanced:customization:online_maps

photo
1

Thank you. I see. But it's no work。。。。。。。。。

photo
photo
1

Perhaps the semicolon at the end of the URL line... remove it.

7819e7efaf4b2ae76f2c27bf3f709e3a

But we can't test the map due to a missing certificate. If you have the certificate, it should work for you.

photo
1

Hi Michal,

thanks for your help.

After using a packet capture tool for analysis, I found that if the tool is used, the request header will use the GET method, and then the tiles can be accessed normally. However, if the packet capture tool is not used, the request header will use the CONNECT method, and the server will refuse the connection. May I ask if this can be modified or adjusted in the XML file?

Here are the correct request and response headers.

request:
:authority: gmaps.botanicgarden.cn
:method: GET
:path: /maps/vt/lyrs=s&x=34&y=20&z=6
:scheme: https
mapid: 5001
user-agent: Locus Map/4.21.1/1124 (samsung,SM-G9550,24)
accept: image/png,image/*;q=0.8,*/*;q=0.5
accept-encoding: gzip

response:

status: 200
server: nginx
date: Fri, 11 Oct 2024 09:27:01 GMT
content-type: image/jpeg
vary: Accept-Encoding
expires: Wed, 25 Jun 2025 14:17:23 GMT
cache-control: public, max-age=22222222
access-control-allow-origin: *
cross-origin-resource-policy: cross-origin
content-security-policy: script-src 'none'; object-src 'none'; base-uri 'none'
x-content-type-options: nosniff
x-server-version-bin: CgoIBBD2gpu4BhgB
content-security-policy-report-only: script-src 'none'; form-action 'none'; frame-src 'none'; report-uri https://csp.withgoogle.com/csp/scaffolding/msptfdsghphc:130:0
cross-origin-opener-policy-report-only: same-origin; report-to=coop_reporting
report-to: {"group":"coop_reporting","max_age":2592000,"endpoints":[{"url":"https://csp.withgoogle.com/csp/report-to/scaffolding/msptfdsghphc:130:0"}],}
x-xss-protection: 0
x-frame-options: SAMEORIGIN
server-timing: gfet4t7; dur=31
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
strict-transport-security: max-age=31536000
content-encoding: gzip

photo
photo
1

I have also that problem. I have a XML file that i have used in Locus before. But it does not work anymore. Attach the file. I have placed the fil in custom folder. I did solve the problem by change the ID of the source.

photo
1

....e2d53ad2a516fa91425abbdc57099c0d

fa94fa87a23f8e2651752e01bde0e45f

8fc4de6c4b7d0a8864ae2384edda6c2f

photo
1

try to replace the "/" with "?":

70a1cd7a6f7adb85b2eeff0ef57a3843

photo
Leave a Comment
 
Attach a file