+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Store Locator auto load location markers

Store Locator auto load location markers

6 posts, 0 answered
  1. ian
    ian avatar
    45 posts
    Registered:
    25 Feb 2013
    30 Oct 2013
    Link to this post
    I have a store locator and in it it brings in the dynamic stores i have put in and creates a list on the left with the map on the right. when it goes through and finds all the stores in a set distance from a zip code it is supposed to drop markers on the map for those stores. In the console i can see the JS get the coordinates for the locations but it doesnt drop the marker until you click on the specific store is it loading a new map after it set the markers thus clearing the markers or something?

    you can see it at http://69.175.120.138/about-us/dealer-locator
  2. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    31 Oct 2013 in reply to ian
    Link to this post
    When you call the addMarker function map is undefined.
  3. ian
    ian avatar
    45 posts
    Registered:
    25 Feb 2013
    31 Oct 2013 in reply to Jonathan
    Link to this post
    ok that makes sense...ill have to find a way around that i guess
  4. Ivan D. Dimitrov
    Ivan D. Dimitrov avatar
    310 posts
    Registered:
    26 Mar 2015
    04 Nov 2013
    Link to this post
    Hi all,

     Jonathan is right. What I can add is that since Sitefinity 6.2 is using Google Maps API v3 your best choice is to research how the addMarker function behaves in order to adjust it. I was not able to find a concrete example but there are a lot of samples available.

    Additionally you can have a Javascript function that does the clicking for you. Something like this will do the trick:

    document.getElementById('yourlocationLinkID').click();
    Regards,
    Ivan D. Dimitrov
    Telerik
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. ian
    ian avatar
    45 posts
    Registered:
    25 Feb 2013
    04 Nov 2013 in reply to Ivan D. Dimitrov
    Link to this post
    it isnt supposed to do it on click it is supposed to do it on page load but for some reason it is loading the info and then loading the map and i need it to do the opposite...
  6. Jonathan
    Jonathan avatar
    119 posts
    Registered:
    19 Dec 2012
    07 Nov 2013 in reply to ian
    Link to this post
    Ian,

    i did this site in sitefinty 5.x. Take a look through how the locations page is working and hopefully it will help. 

    Jerryshardware.com
6 posts, 0 answered