Marker with panel and passing URL values

More
1 year 9 months ago #14838 by bwd
Hi I'm having a strange issue. I am trying to pass a parameter through the url link to my joomla 3.10 map. I am using the parameter to show a different marker depending on the link that was clicked.

In my article I have:
Code:
{source}<?php     $ID = isset($_GET['site']) && $_GET['site'] >= 0 && $_GET['site'] <= 999 ? $_GET['site'] : -99;     $ID = htmlspecialchars($ID);     if(is_null($ID) || $user->guest) {         $str = '{zhosmmap-group:3,5;2;7}';     } else {         $str = '{zhosmmap-group:3,5;2;;;;;' . $ID . ';click,elastic bounce;}';     }     echo $str; ?> {/source}

But as soon as I add a parameter to my map URL, then the side panel does strange things.
windisgood.com/webcam-map.html     <= this is okay
windisgood.com/webcam-map.html?site=81     <= the side panel loads the entire website

I also tested this on your demo site and it seems to do also have issues:
joomla.zhuk.cc/index.php/zhosmmap-main/o...ature-map-with-panel
joomla.zhuk.cc/index.php/zhosmmap-main/o...p-with-panel?site=11

Is there a better way to display a map in an article and open a placemark by ID that was included in the URL?

Thanks
Dave

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago - 1 year 9 months ago #14839 by Dima
Replied by Dima on topic Marker with panel and passing URL values
I can see for case 2 - library jquery-ui loaded before jquery.
In this case you have the error tabs not defined.

Try to load jquery.min.js before (by your template), or look at my docs how load additional js and css files (settings for map)

In my docs I wrote only for J3, if you have J4 you need enter the other path to jquery library

And for case 1 I don't know why when you click close panel it is only hide it, not resize map

Don't forget support my developments: post review in JED , donate , help with translation ;)
Last edit: 1 year 9 months ago by Dima.
The following user(s) said Thank You: bwd

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #14840 by bwd
Thanks for the help. I do have these added to the Advanced Options for the map:
/media/jui/js/jquery.min.js
/media/jui/js/jquery-noconflict.js

I also have the same issue when I try to view the map using the article link:
windisgood.com/index.php?option=com_content&view=article&id=49

I was hoping to pass the marker ID to the page, and this does display the correct marker, but the side panel is really messed up:
windisgood.com/index.php?option=com_cont...rticle&id=49&site=82

Dave

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #14841 by Dima
Replied by Dima on topic Marker with panel and passing URL values
Hi Dave

I didn't understand you. Lets step by step.

You created article with plugin call. And what do you have and what do you expected. Do you have correct group display and center on placemark you want?

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #14842 by bwd
I have an article with the contents:
{zhosmmap-group:3,5;2;;;;;73;click,elastic bounce;}

The results shown here are perfect:  windisgood.com/webcam-map-3.html

But I would like to pass the marker ID (shown in RED) in the url:
windisgood.com/webcam-map.html?site=73

Then the article gets the site number from the url:
$str = '{zhosmmap-group:3,5;2;;;;;' . $site . ';click,elastic bounce;}';
echo $str;

This way I don't have to make an article for every marker I want to link to on a map. The problem is that once I add the ?site=73 to the end of the url link, then the side panel contents are broken:
windisgood.com/webcam-map.html?site=73

It's not a big deal since I can create individual articles, each with different marker ID and link to each one. I have 12 webcams and I want to put a map location button on each webcam page.

Hope that makes sense.
Thanks,
Dave

 

Please Log in or Create an account to join the conversation.

More
1 year 9 months ago #14843 by Dima
Replied by Dima on topic Marker with panel and passing URL values
Hi

Happy New Year!

I can't understand it

If you enter your ID=75 in your file - does it display map correctly?

If yes - check when your page is process by joomla. Probably you need to write your php code before it

Don't forget support my developments: post review in JED , donate , help with translation ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.204 seconds
Powered by Kunena Forum