-
AuthorPosts
-
June 26, 2015 at 4:02 pm #207893
Hi,
I have mutliple markers/locations on my JA Map and need to have the possibility for people to get directly to Google Maps so they find the placed by Google route planner.
The JA Maps plugin does not have an option like “get there” that would lead me to “real” Google Maps, right?
I tried to implement a link in the embed-code so I could have a link in the tooltip at least but this did not work.
Any suggestions how I can get this working?
Thanks
ChrisThanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 29, 2015 at 3:29 am #575750Hello,
To add link to google map page on Info window popup, please download the attache file (script.js.txt), and rename it to “script.js” file and replace the current file on your site
plugins/system/jagooglemap/assets/script.jsI have added some code snippet to add link on that file, in case you want to update the link, you can find a code like below:
var lat = results[0].geometry.location.lat(),
lon = results[0].geometry.location.lng();
var link = 'https://www.google.com/maps/dir/'+lat+','+lon+'//@'+lat+','+lon+',16z';
info += ' <a href="'+link+'" target="_blank">Get there</a>';and
var link = 'https://www.google.com/maps/dir/'+lat+','+lon+'//@'+lat+','+lon+',16z';
info += ' <a href="'+link+'" target="_blank">Get there</a>';
Thanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 29, 2015 at 3:29 am #642079Hello,
To add link to google map page on Info window popup, please download the attache file (script.js.txt), and rename it to “script.js” file and replace the current file on your site
plugins/system/jagooglemap/assets/script.jsI have added some code snippet to add link on that file, in case you want to update the link, you can find a code like below:
var lat = results[0].geometry.location.lat(),
lon = results[0].geometry.location.lng();
var link = 'https://www.google.com/maps/dir/'+lat+','+lon+'//@'+lat+','+lon+',16z';
info += ' <a href="'+link+'" target="_blank">Get there</a>';and
var link = 'https://www.google.com/maps/dir/'+lat+','+lon+'//@'+lat+','+lon+',16z';
info += ' <a href="'+link+'" target="_blank">Get there</a>';Thanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 29, 2015 at 3:29 am #740739Hello,
To add link to google map page on Info window popup, please download the attache file (script.js.txt), and rename it to “script.js” file and replace the current file on your site
plugins/system/jagooglemap/assets/script.jsI have added some code snippet to add link on that file, in case you want to update the link, you can find a code like below:
var lat = results[0].geometry.location.lat(),
lon = results[0].geometry.location.lng();
var link = 'https://www.google.com/maps/dir/'+lat+','+lon+'//@'+lat+','+lon+',16z';
info += ' <a href="'+link+'" target="_blank">Get there</a>';and
var link = 'https://www.google.com/maps/dir/'+lat+','+lon+'//@'+lat+','+lon+',16z';
info += ' <a href="'+link+'" target="_blank">Get there</a>';June 29, 2015 at 3:52 pm #575817Hi,
thanks, that’s cool, one last question: now it puts the location in the “travelling from” field in the Google maps route planner (upper field), So I have to switch the fields every time manually to have the target lodaction in “travelling there” (lower field). Can you change something in the script so it jumps to the lower field automatically?
Thanks
ChrisThanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
June 30, 2015 at 1:55 am #575848<em>@brandzeichen 480552 wrote:</em><blockquote>Hi,
thanks, that’s cool, one last question: now it puts the location in the “travelling from” field in the Google maps route planner (upper field), So I have to switch the fields every time manually to have the target lodaction in “travelling there” (lower field). Can you change something in the script so it jumps to the lower field automatically?
Thanks
Chris</blockquote>To set your location as destination, please open the script.js file that I mentioned above, and find the code snippet
var link = 'https://www.google.com/maps/dir/'+lat+','+lon+'//@'+lat+','+lon+',16z';
And replace it with:
var link = 'https://www.google.com/maps/dir//'+lat+','+lon+'/@'+lat+','+lon+',16z';
-
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by Thanh Nguyen Viet 9 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum