This object is in archive! 

Locus Map 3.50.1 mapsOnline URL broken : unable to access

NewVar shared this problem 3 years ago
Not a Problem

Hi,

Since version 3.50 unable to access at online maps (use specifique URL to French Géoportail). Main screnn display 'unable to access'. Restore version 3.49.1 and work fine.

Why?

url example : http://mysite.url?layer=GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR&style=normal&tilematrixset=PM&Service=WMTS&Request=GetTile&Version=1.0.0&tilecol={x}&tilerow={y}&tilematrix={z}&format=image/jpeg

Replies (21)

photo
1

Hi,

could I ask you if you use a custom online map source, please?

Anyway, please use an official subscription for IGN Topo maps? Menu > Maps > IGN Topo.

Thanks, Petr

photo
1

Hi,


I use online maps for 2 reasons:

- the choice of cards in particular for the overlay

- access is free and legal

Best

photo
1

Hi,

I'm not sure (from your answer) if you use custom online maps. If you use a custom online map, please send me your definition .xml file. I guess that you defined a custom user-agent. This option is no more available.

Thanks, Petr

photo
1

Hi,

See two examples of custom online map.

Working

	<provider id="10800" type="0" visible="true" background="-1">
		<name>MapBox</name>
		<mode>Classic</mode>
		<countries>World</countries>
		<url><![CDATA[]></url>]https://{s}.tiles.mapbox.com/v4/mapquest.streets-mb/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwcXVlc3QiLCJhIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg]]></url>;;
		<serverPart>a;b;c;d</serverPart>
		<zoomPart>{z}-8</zoomPart>
		<zoomMin>8</zoomMin>
		<zoomMax>30</zoomMax>
		<tileSize>256</tileSize>
		<attribution><![CDATA[MapBox]]></attribution>
		<extraHeader><![CDATA[Referer#]></extraHeader>]https://www.mapbox.com/tour/]]></extraHeader>;;
		<extraHeader><![CDATA[User-Agent#Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0]]></extraHeader>
		<usage>road,city</usage>
	</provider>
Not working

	<provider id="15051" type="0" visible="true" background="-1">
		<name>Géoportail (IGN)</name>
		<mode>[S] Estompage</mode>
		<url><![CDATA[http://wxs.ign.fr/og8xoaoz24qoc1wafvmhcsd3/geoportail/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ELEVATION.ELEVATIONGRIDCOVERAGE.SHADOW&STYLE=estompage_grayscale&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image/png]]></url>;
		<zoomPart>{z}-8</zoomPart>
		<zoomMin>9</zoomMin>
		<zoomMax>23</zoomMax>
		<tileSize>256</tileSize>
		<countries>France</countries>
		<extraHeader><![CDATA[User-Agent#Mozilla/5.0 Gecko/20100101 Firefox/49.0]]></extraHeader>
		<extraHeader><![CDATA[Referer#http://m.geoportail.fr/]]></extraHeader>;
		<attribution><![CDATA[Institut national de l'information géographique et forestière (IGN) - Tous droits réservés - https://www.geoportail.gouv.fr/mentions-legales/]]></attribution>;
		<usage>aero</usage>
	</provider>
Best

photo
1

Hi,

thank you for the definition.

From the 3.50.0 version it's not possible to set a custom user-agent. I don't know the details in IGN service but I guess that issue is caused due to a custom user-agent that's used in your XML.

I'm sorry but I can't offer any solution. Please check if IGN offers the same layer as WMS or TMS service.

Thanks, Petr

photo
1

Hi,

Thank for assistance but i don't know why since 3.5 version LOCUS MAP have changed the parameters in providers.xml and that only impact IGN while the same XML scheme continue to work with other software... MOB in example.

LOCUS MAP would he not have taken a commercial position on the sale of maps?

photo
1

... and after many testing with proxy log i discovered that URLs starting with https://wxs.ign.fr/ are blocked by LOCUS MAP since version 3.50.0


Whoo it's bad news and this could confirm that LOCUS MAP has made a business decision that goes against users?

photo
1

Hello NewVar,

as the main app developer, I'll try to give you a help here.

Locus Map does not block IGN.fr servers. I'm trying your custom map definitions and the response from the server is "403 Forbidden".

I'm trying the same definition with enabled custom user-agent and the map does not work as well. Even in Insomnia (Postman), the result is the same.

/61e4dae5f53d0caa6e4ed8eea138a6dc

So to me, it looks like really invalid parameters. I'm surprised that free service require exactly defined referer and user-agent values. Are there any public docs?

photo
1

Hi Menion,

I appreciate your job and fabulous application LOCUS MAP.

It's normal your have not acces because API Key in this messages file it's only for get XML scheme.

I send to you in private message the URL/API key to test your developpment...

Best

photo
1

Ah oki. I may change this discussion to "private" if this helps.

If the API key was not valid, I really think it will have something to do with blocked user-agent as Petr wrote before.

I've already discussed this topic here, if you are interested in the reasons behind it.

photo
1

Received over PM, thanks.

Your Url reports following error from the server: "Le format image/png n'est pas gere pour la couche GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR".

Correct format is "FORMAT=image/jpeg".

Anyway with current app version that really blocks custom user-agents, map really does not work. Any idea why public legal service may be used only from the web browser?

photo
1

Sorry but in URL for testing (private mess) the format is correct "&format=image/jpeg"

This service work perfect up to version LOCUS 3.49.1. Since 3.50.x not working...

[IMHO] since add the control of fake agent the service down. Search in this direction[/IMHO]

photo
1

Ah sorry, I copied only the start of the provided Url, you are correct.

photo
1

I confirm that I had the same problem with Locus Map 3.50 (see "Merged objects" in the initial post at the top of the page). Me too (seeing THIS discussion) reinstalled Locus Maps 3.49.1, and everything is working fine. There is therefore no syntax error in the code of our file "providers.xml", but there is a bug in Locus Map 3.50.

I do not understand why this topic is classified "Not a problem"

photo
1

Hello Yves,

I believe, all was already written in other comments and also in the second-mentioned topic.

So why you think that current behavior is a bug and that was not already covered in the mentioned posts?

photo
1

Hi Menion,

The qualification of the post...

It does not work anymore since version 3.5.x. It is either

- a development bug

- or an undocumented LOCUS MAP action

You tell us...

Best

photo
1

Hi,

this action was documented in the app news. I thought that Petr already posted a link to the previous discussion here, sorry, my bad. Please check this discussion I had a while ago: https://help.locusmap.eu/topic/23059-blocking-user-agents-in-3-50 . I believe it explains all your questions.

Menion

photo
1

... and progress in search resolution... user-agent (Mozilla/5.0 Gecko/20100101 Firefox/49.0) is key of the solution. Minimal string is "Ge" (cap not important). It's IGN security access to ressources.

photo
1

This is a "security solution of the IGN"? Hmm ...

@Petr Voldan , you are in touch with guys from IGN right? May you contact them and ask about this problem? Thanks!

photo
1

On subscription page...

11717c2da17b6d86872d04ea12147ccf

photo
1

I contacted the IGN to get more info

@NewVar the image you sent - this is some security settings you can define when you order IGN KEt (subscription)?

photo
1

Hello Menion,

I apologize for my inappropriate response. I don't read English very fluently, and this explains it.

I was unaware of the discussion you provided the link to:

https://help.locusmap.eu/topic/23059-blocking-user-agents-in-3-50

I enjoyed WITHOUT RESTRICTIONS (until recently) Locus Map which has become my essential field companion (I am an amateur naturalist photographer). Also, my intention is ABSOLUTELY NOT to argue in a sterile manner or in bad faith.

I did not understand much in this discussion around "User-agent". Also, I will place myself as a user facing FACTS.

IGN, with its Geoportal API, is a Public Service which, globally, markets its data and which, therefore, protects it. However, he has chosen a commercial policy (which is in the process of change), aimed at offering FREE use to non-professional and non-commercial users. This is done by offering a possibility of free use with a limitation of the NUMBER OF TRANSACTIONS. It is up to the users to take their responsibility.

This explains why, even for free use, it is necessary to contract with IGN for precise use of the service (choice of WMTS layers, etc.), and supposes the granting of a key (limited in time and renewable), and a control device (name and password, or user-agent).

I have such a contract and I am therefore PERFECTLY IN THE LEGALITY with respect to IGN. Also, until LOCUS version 3.49, I was a fully satisfied user. Since version 3.50, I am still as legal as regards IGN and LOCUS, but I can no longer display my dear cards outdoors (except to remain stuck on LOCUS 3.49 which I have yet paid), and therefore I am no longer satisfied.

I had imagined it was a bug. Sorry about the misunderstanding. I have now understood that this is a deliberate choice of the designers of Locus. Like other users, I regret this choice of which WE highlight inappropriate consequences.

Also, my question, ultimately, is simple: Do you plan, yes or no, to allow us to find the use of our dear IGN maps on LOCUS, and how? Otherwise, I am thinking of migrating to another product, in desperation.

Best regards

Yves Durivault

Le 04/02/2021 à 19:20, Locus Map a écrit :

photo
1

Hello Yves,

thanks for explanation. We made this change in 3.50 to be fair for other map providers. To not to hide Locus Map behind some Firefox or other web browsers.

Your last question: I do not plan to change this behavior, so I do not plan to allow faking/hiding of Locus Map when asking for the map data. As I wrote in the mentioned topic, we will definitelly try to help making a maps work. It is not our intention to force users to pay for something.

I already asked Petr to contact IGN. You may do this as well. Question is "why they use this weird useless mechanism like restricting apps based on the user-agent". It is currently first map provider we are aware, that has this problem.

Menion

photo
1

SwissTopo has same UA restriction...

photo
1

Can you communicate you UA?

photo
1

Yes it is, Peter.

YD

Le 05/02/2021 à 16:05, Locus Map a écrit :

photo
1

I contacted IGN via a specialized forum, and I got the following answer:

Hello,The source of all your problems is securing the geoservices key you use:

In order to modify the security of your key, I advise you to contact this email address: contact.geoservices@ign.fr to add for example : LOCUS-MAP

 ... in the list of authorized user-agents with your key.

Indeed, if it is not more complicated than that !

I want to try this solution if you provide me with the EXACT SYNTAX of the user-agent you defined for Locus Maps. 😁

YD

Le 05/02/2021 à 16:05, Locus Map a écrit :

photo
1

UA syntax it's my query this morning to Menion... the LOCUS MAP subject is "obscure" :(

photo
1

I'm not sure if I help you here.

Only in common for all user agents is that they starts with "Locus" word. This is probably the key!

Rest is different. This is how looks current Locus Map 4 version (in development): Locus Map/4.0.0 - Beta 4/986 (samsung,SM-G977N,25).

Current Locus Map Pro on my device will be: Locus Map Pro/3.5.1 (samsung,SM-G977N,25).

Values in bracers are generated based on the device model.

Hope this helps.

photo
1

FYI: I contacted the contact.geoservices@ign.fr this afternoon. So I'll ask them to add the "key" "Locus" in the list of accepted user-agents. Thanks

photo
1

The solution consist to add a string in LOCUS UA. IGN search string "ge" only this two letters ! Test with my url sended in private post and change in your browser the UA to "ge" to display cartographic layer. Also possible to mix ge with other text string...

photo
1

Especially for the interlocutor "NewVar" :

I just made a test with another contract with IGN, whose security mode is : login + password.

It works perfectly on locus 3.49! (I will check with 3.50 free as a temporary installation on my girlfriend's smartphone ).

I suggest you also test and let us know the result of your test, preferably on Locus 3.50.

... and also tell me what you think of this resolution !

YD

The syntax for the file providers.xml  is :

    <provider id="xxxxx" type="0" visible="true" background="-1">

        <name>Geoportail</name>

        <mode>Carte Scan25 touristique</mode>

        <url><![CDATA[https://wxs.ign.fr/the_key_here/geoportail/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN25TOUR&STYLE=normal&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image/jpeg]]></url>

        <zoomPart>{z}-8</zoomPart>

        <zoomMin>8</zoomMin>

        <zoomMax>26</zoomMax>

        <tileSize>256</tileSize>

        <countries>France</countries>

        <extraHeader><![CDATA[login#your_login]]></extraHeader>

        <extraHeader><![CDATA[password#your_password]]></extraHeader>       

        <usage>road,city</usage>

    </provider>   

Le 05/02/2021 à 22:00, Locus Map a écrit :

photo
1

Thank YD

Effectivly this is one solution. Other is include UA "locus" terme by IGN in system. But the best one solution consist to add LOCUS.user.parameter to prefix (or suffix) LOCUS UA.

I dont understand why LM has disgraded the APP with the fixed UA...

photo
1

Hello NewVar

No, in fact my "trick" is not working. I believed it during a (too) quick test but it was the cache that displayed the map!

After emptying the cache, nothing!

I asked the IGN, for my key used with LOCUS, to add "Locus" in the chains authorized in User-agent and I am waiting for the answer.

More news from Menion on NewVar's remark ???

YD

Le 09/02/2021 à 11:50, Locus Map a écrit :

photo
1

Hello YD,

I was testing today this option to add locus at U-A... not working. Two reasons what the IGN not recognize my personnal U-A "Locus Mozilla/5.0 Gecko/20100101 Firefox/49.0":

- U-A string too long and precise

- LOCUS write his U-A

Next steep, contact IGN to change my U-A to "*lo*" only...


For information it's no necessary to have 2 smartphone to test version app. Just have correct APK file and delete files cache in locus/map online.

photo
1

Latest news :IGN made the change I requested for my geoservices user key.

So, the User-agent security is now: * gis *, Locus, Locus-map.

(Note that they have provided for this adaptability, precisely, among others, for applications of the "Locus" type).

Well ... it still doesn't work with LOCUS 3.50.... and it's seriously starting to tire me.

I urge Menion to clarify one last time what can be done at LOCUS to find a solution to our problem.

YD

Le 10/02/2021 à 17:27, Yves Durivault a écrit :

Hello NewVar

No, in fact my "trick" is not working. I believed it during a (too) quick test but it was the cache that displayed the map!

After emptying the cache, nothing!

I asked the IGN, for my key used with LOCUS, to add "Locus" in the chains authorized in User-agent and I am waiting for the answer.

More news from Menion on NewVar's remark ???

YD

Le 09/02/2021 à 11:50, Locus Map a écrit :

photo
1

Hello Yves, NewVar,

to be true, I do not understand why we should deal with problems on the IGN side. Access to service is granted based on your own API key and some kind of user-agent does not make sense at all. Yves, you've already wrote about the option to use name/pass in requests so where is a problem? You confirmed that this solution works correctly.

User-agent is usually used to identify the application that is responsible for communication with the opposite side so I'm sure we all will agree, that it does not make sense to fake Locus Map as a Firefox browser.


In the worst case, I may hardcode faking of user-agent just for IGN servers just because of this problem, but because the name/pass system works, I believe it won't be necessary.

photo
1

Thank for your perseverance Menion.

IGN has particular system protection.

If you hard code the U-A "Mozilla/5.0 Gecko/20100101 Firefox/49.0" for IGN this is best solution to resolve this topic. Remember that the same problem for the U-A with Swisstopo.

photo
1

Hello Menion,

I am responding to your last email:

I don't want to take sides on  the first paragraph of your answer, and I agree with the second: "it does not make sense to fake Locus Map as a Firefox browser".

First, update: My attempt to use the request with username and password does not work, contrary to what I had indicated previously (it was the cache that temporarily delivered the tiles. .., sorry for the confusion).

It is a fact that certain providers of geographic data, including IGN, use user-agent as a means of securing the use of the data delivered.

In the case of use for portable mapping application type Locus or equivalent, it is THE ONLY one intended for.

However, IGN does not require LOCUS to hide like a Firefox browser. It is only necessary that LOCUS be recognized by a specific user-agent, and that the users  contract with the IGN for a key with use of this user-agent.

For example, for my QGIS Geographic information system, I use user-agent * GIS * .

Okay, I see NewVar responded too ... I join him for "Thank for your perseverance Menion ! 😁

YD

Le 12/02/2021 à 09:40, Locus Map a écrit :

photo
1

Hmm, this is a really stupid situation ...

I do not like this solution, but since the next version, the app will automatically use Firefox, Locus-Map as a user agent for maps with Url starting with https://wxs.ign.fr/ . I've tested it and this UA works correctly. It is "faked" but also contains "Locus Map". Seems that "Firefox" is the keyword.


Usable for all?

photo
1

See screen on video. Proposal work but it's necessary to fix that sting (w/o add variables suffix-prefix)


https://youtu.be/PTZh37Mc9fs

photo
1

Thanks for the video, but I'm not sure I understand. Seems that "Fire" is the keyword, thanks. I've added to the app "Firefox, Locus-Map" string as UA, which seems to work as well on your video.

photo
1

You can add whatever you want to the character string that you registered with IGN. Your proposal to hard code the U-A "Firefox, Locus-Map" is therefore functional

photo
1

If you are interested if my fix works, you may give a try to public Beta version of latest Locus Map version here: https://forum.locusmap.eu/index.php?topic=7188.0 , or please wait probably up to three weeks, till we publish new regular version on the Google Play. Thanks for understanding.

photo
1

Big thanx Menion 😎

https://youtu.be/RSlwh_OP-xc

Testing IGN layers and Swisstopo. Working !

photo
1

SwissTopo as well? Interesting, there was no change on the app side. Only what happens now, is that app supply mentioned "Firefox, Locus-Map" user-agent for map starting with https://wxs.ign.fr/ URL. Hmm.

Anyway, I'm glad that IGN works. From what I wrote before, I'm sure you understand that I'm not too happy with this solution, on the second side, from the user-agent is clear that the client is "Locus Map", which was my main intent.

Thanks for the patience!

photo
1

I want to thank you very much, Menion!

I think the solution you have implemented, if you are not completely satisfied with it, is the BEST SOLUTION: Locus is identified, and the users of IGN services are satisfied!

Thank you for your perseverance and for your willingness to fix this problem.

Thanks to this, I will be able to continue my naturalist outings in the field with the excellent maps from IGN, on my favorite application, LOCUS, which is like a third hand for me!...

and I will continue to promote LOCUS to my amateur naturalist friends!

Thank you also to NewVar for participating by providing relevant information to the settlement of the problem!

(Sorry for my somewhat broken English, which owes a lot to Google's automatic translator 😉)

Yves DURIVAULT

https://garsyves.fr

Le 16/02/2021 à 09:40, Locus Map a écrit :

photo
1

You are welcome :).

Little sorry for extra work I made with this update. Intent wasn't to complicate life to users, but to protect web servers and stop allow hiding a Locus Map app.

Anyway it works now, perfect!

Btw. you have AMAZING photos on the garsyves.fr web site!!


Menion

photo
1

At the attention of NewVar

(sorry, Menion, that's the only way to reach him)

Everything works fine for me EXCEPT the layer "Plan IGN v2" (which I contracted as a free key with the good User-agent value). The layer "orthophoto" works well with thesame key (???).

Here is my xml code:

<provider id="11000" type="0" visible="true" background="-1">

<name>Geoportail</name>

<mode>PLAN ign v2</mode>

<url><![CDATA[https://wxs.ign.fr/(my key)/geoportail/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2&STYLE=normal&TILEMATRIXSET=PM&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=image/jpeg]]></url>

<zoomPart>{z}-8</zoomPart>

<zoomMin>8</zoomMin>

<zoomMax>26</zoomMax>

<tileSize>256</tileSize>

<countries>France</countries>

<extraHeader><![CDATA[User-Agent#Firefox, Locus-Map]]></extraHeader>

<usage>road,city</usage>

</provider>

Can you compare with yours ? Thanks

My direct mail : yves.durivault@gmail.com

Le 16/02/2021 à 09:35, Locus Map a écrit :

photo
1

Dear Yves,

TOPO v2 do not support jpeg format. Change to PNG and work great.

FORMAT=image/jpeg => format=image/png

Yves is NewVar ;)

photo
1

NewVar, thank you!

Yes, it works fine ! I'm sorry, I could still have had this idea ...😅

Well, as long i win, I play :

...Watching your little video, I saw that you manage to view France's nautical charts (not the littoral map from IGN, but nautical) ...

If you could help a poor old man like me to do that, I would appreciate it vey much ... but I may be asking a lot, there.

...Waiting and hoping ! 😂😂😂

YD

Le 19/02/2021 à 18:05, Locus Map a écrit :

Replies have been locked on this page!