Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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

    #536324

    Hi 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,
    Rikard

    #536886

    Ok 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

    #538864

    Hi,

    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,
    Josue

    #541866

    my 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

    #544831

    Hey!

    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!
    Elliott

    #548201

    with the new update to the google map api, is it now possible to hook a recenter map on a link in the page?

    #548472

    Hi!

    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.