Show route/track on OSM map (GPX or KML)

Phoca Maps - displaying maps in Joomla! CMS
rogerco
Phoca Member
Phoca Member
Posts: 47
Joined: 18 Sep 2011, 16:17

Re: Show route/track on OSM map (GPX or KML)

Post by rogerco »

Hi @MKfan

That page you linked to is a google map (or derivative) not an openstreetmap (OSM) (or derivative)

The change in PhocaMaps v3.0.12 is to show tracks on openstreetmaps (which was not possible before) and to set a colour for each track using OSM. It doesn't apply to google maps. If you switch to using OSM type maps then the colours will work for GPX files (but I'm not sure if a satellite view is available)

When I said in a previous message that the colours didn't seem to be working in the published 3.0.12 version that turned out to be a result of the way I had done the upgrade on my test site - it simply hadn't picked up the change of table names between my version and the published one. I've tested it on a vanilla install and all works fine.

I think this was just a quirk of my test site and not a problem - sorry for getting your hopes up. It may be possible to change the track colour when using a google map, but I try to avoid google products when there is a better alternative (eg OSM) so I've no idea how. It needs someone familiar with the google map API to take a look.

RogerCO

Tags:
MKfan
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 07 Jul 2021, 22:29

Re: Show route/track on OSM map (GPX or KML)

Post by MKfan »

Hi Rogerco,

thanks for your check. I confirm that the color work using openstreetmap (OSM)

unfortunately the custom icon of marker are not supported.

I can use a different map but i can't give up on custom icons.

I hope we can find a solution through the maps api, after all it is only a parameter of a color.

thanks for your attention.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48142
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Show route/track on OSM map (GPX or KML)

Post by Jan »

Hi, what exactly do you mean with:

"unfortunately the custom icon of marker are not supported."?

In OSM, you can set the fontawesome icon as the marker icon.

Image

Jan
If you find Phoca extensions useful, please support the project
MKfan
Phoca Newbie
Phoca Newbie
Posts: 6
Joined: 07 Jul 2021, 22:29

Re: Show route/track on OSM map (GPX or KML)

Post by MKfan »

Hi Jan,

in Markers --> Design Settings ( Google maps ) i can select custom icon designed by me ( External Icon )
I can't do this in the section Markers --> Design Settings ( OSM )

it would be enough to be able to change the color of the current path to the Google MAPS settings, to have a perfect job.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48142
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Show route/track on OSM map (GPX or KML)

Post by Jan »

Hi, yes, this is different for both services. In OSM, you can use the fontawesome or glyphicon icons. In Google Maps, old feature is used - to display images as icons (raster image), in OSM new feature is used - to display fontawesome/glyphicon icons (vector image).
If you find Phoca extensions useful, please support the project
belousov
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 29 Nov 2023, 10:08

Re: Show route/track on OSM map (GPX or KML)

Post by belousov »

Hi Rogerco,
thank you for your additions with openstreetmaps,

I am really up to use it - but still need the elevation profile...
It was in the implementation list, is it in near future?

Thank you and have a good day,
Vladimir
rogerco
Phoca Member
Phoca Member
Posts: 47
Joined: 18 Sep 2011, 16:17

Re: Show route/track on OSM map (GPX or KML)

Post by rogerco »

@belousov this is really a question for @jan. I actually wrote my own maps component in the end which does things slightly differently in terms of how categories and tags using the joomla native system so the tags integrate with other components, only uses OSM based maps, and has a different way of handling markers. But although I keep meaning to do it I haven't integrated elevation plots yet - I simply insert them as an image taken from loading the track in https://gpx.studio and copying the image.
Also my component is only Joomla3 compliant as I don't use J4/5 (far too much work involved in rewriting components I use on my sites). Private message me if that is of any use to you.
Roger
Post Reply