Openstreetmap - Layers seclection

Phoca Maps - displaying maps in Joomla! CMS
Yaktati
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Nov 2023, 07:01

Openstreetmap - Layers seclection

Post 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

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Openstreetmap - Layers seclection

Post 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
If you find Phoca extensions useful, please support the project
Yaktati
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Nov 2023, 07:01

Re: Openstreetmap - Layers seclection

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Openstreetmap - Layers seclection

Post by Jan »

Hi, can you paste here more detailed information about the code which is needed to set such layers?

Jan
If you find Phoca extensions useful, please support the project
Yaktati
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Nov 2023, 07:01

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

Post 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
Yaktati
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 04 Nov 2023, 07:01

Re: Openstreetmap - Layers seclection

Post by Yaktati »

The GPS coordinates are already transmitted to the API. Why not the layer code (N, NT, ...) ?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47887
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Openstreetmap - Layers seclection

Post by Jan »

Hi, thank you for the info, added to feature request list.

Jan

https://github.com/PhocaCz/PhocaMaps/issues/7
If you find Phoca extensions useful, please support the project
Post Reply