Tagged: map
-
AuthorPosts
-
November 13, 2015 at 10:37 pm #535754
Hi,
I am now doing a website where we use the google map api a lot and so far, it’s really great.
I would like to know if there is a way i could recenter the map using links in the page… (like i have 3 markers on the map and i want to move map to a specific marker using a link elsewhere in the page)
I found this code but can’t find if the map have a global name i can use to hook my javascript call
map.setCenter(new google.maps.LatLng(10.23,123.45));
Like now there is no var “map” defined globally, but there should be one prolly named differently
Thanks in advance
November 16, 2015 at 6:59 am #536324Hi lepetitweb,
I’m not 100% sure I understand what you are trying to do there but send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Thanks,
RikardNovember 16, 2015 at 9:16 pm #536886Ok thanks for the upcoming help.
To makes it more clear…
I have a page where I list companies on a map and on a list below the map. I want to put a link on each companies on the bottom listing who make the map over it center on that company marker on the map
Presently, I only putted an alert in the onclick of the companies listing where I want to make the link to recentering the map
November 19, 2015 at 11:10 am #538864Hi,
Please note that our theme support is limited to theme-related questions or requests. That being said, does your code works with the default WordPress theme? i’d suggest trying with that first, if something doesn’t work with Enfold we may be able to help you debug that.
Regards,
JosueNovember 24, 2015 at 6:52 pm #541866my code will not work with defaut wordpress theme since I use a enfold object (your google map object)… All i want is being able to place a link in the page to recenter your google map object on a marker address.
I can replace your google map shortcode by my personnal google map code, but since your object is good and already adapted to the theme, I wanted to use it… I just can’t find the javascript objet that I can call action on to make it recenter like in this code:
map.setCenter(new google.maps.LatLng(10.23,123.45));
The “map” should be the name of the google map object that we can call methode on…
Thanks in advance for your help
November 30, 2015 at 10:10 pm #544831Hey!
You can find the javascript around line 435 in the /enfold/js/shortcodes.js file but this is bordering on custom work so it would be best to hire a freelancer to help you out with this customization. You might be able to find a google maps plugin that has this feature.
Cheers!
ElliottDecember 7, 2015 at 6:23 pm #548201with the new update to the google map api, is it now possible to hook a recenter map on a link in the page?
December 8, 2015 at 2:41 am #548472Hi!
Create a feature request here, https://kriesi.at/support/enfold-feature-requests/, and we’ll see if we can get something worked out in a future update.
Best regards,
Elliott -
AuthorPosts
- You must be logged in to reply to this topic.