Page 1 of 1

Openstreetmap - Layers seclection

Posted: 04 Nov 2023, 07:28
by Yaktati
I discover Phoca Maps with Openstreetmap today - GREAT but ...
I need the Transport layer ...

Indeed :
Openstreetmap offers several very useful layers :
• Routes layer
• Transport layer
• CyclOSM layer
• …

A parameter in the map description should select the layer
It seems to be easy to develop

Thanks to Phoca developpers

Yaktati

Re: Openstreetmap - Layers seclection

Posted: 07 Nov 2023, 01:12
by Jan
Hi, did you try to use KML file to insert layers :idea: Maybe, this could be the way for displaying layers. :idea:

Image

Jan

Re: Openstreetmap - Layers seclection

Posted: 08 Nov 2023, 22:48
by Yaktati
Hi,
Thank for proposal, solution could be by KLM file, but too difficult to envisage
Problem is very more simple : it'is the choice between the layers existing in OSM,
Have a look for samples for Brussels :
I would like to present the 2 maps (please zoom it) :
- https://www.openstreetmap.org/#map=14/5 ... 2&layers=N
- https://www.openstreetmap.org/#map=14/5 ... &layers=NT
This last layer show common transports in a town as you cannot view in Google Maps
In OSM, you have the feature to select layers by the parameter "layer" which could take the following values :
N, YN, CN, TN, PN, ON, HN
I don't find any parameter to define the layer.
It's easy to implement and offers 7 possibilities without equivalent in Google Maps

Re: Openstreetmap - Layers seclection

Posted: 10 Nov 2023, 23:42
by Jan
Hi, can you paste here more detailed information about the code which is needed to set such layers?

Jan

Re: Openstreetmap - Layers seclectionhttps://www.openstreetmap.org/#map=14/50.8464/4.3442&layers=N

Posted: 06 Dec 2023, 17:00
by Yaktati
Hi
I don't know the code needed
I just know that the current extension use a url like that
https://www.openstreetmap.org/#map=14/5 ... 2&layers=N
Code must be extended to have the choice for the layer N, NT, ...
I just need to show map
https://www.openstreetmap.org/#map=14/5 ... &layers=NT
(with NT as last parameter)
I don't have sufficient knowledge in PHP to propose the relevant code
Who can propose it ?
It will be great to propose it in the next version of Phoca Maps
Yaktati

Re: Openstreetmap - Layers seclection

Posted: 06 Dec 2023, 17:35
by Yaktati
The GPS coordinates are already transmitted to the API. Why not the layer code (N, NT, ...) ?

Re: Openstreetmap - Layers seclection

Posted: 07 Dec 2023, 18:36
by Jan
Hi, thank you for the info, added to feature request list.

Jan

https://github.com/PhocaCz/PhocaMaps/issues/7