Basic Google Maps Web Part

Keith Deshane asked on February 24, 2014 07:20

Hi, I am currently using the Basic Google Maps web part in an ASPX Templates site that uses Kentico 7.0.41 on .NET 4.0. The page is What were are trying to do for the client is set it up so that if you choose an option in the City drop down, the map will re-center on that city and keep all of the pin data that we have loaded. However, I can't seem to find an event within the web part that will allow me to do so. On the dowp down list's OnSelectedIndexChanged event, I have tried to reset the map's Default Location, and then databind again, but it just always centers the map in the middle of the ocean off the coast of Africa. Is there a way to handle the functionality I'm looking for, or do I need to use javascript and the google maps api instead?

Recent Answers

Brenden Kehren answered on February 24, 2014 10:20

What I did for this was created a custom macro that retrieved the lat and long from session. I had created a custom filter that when all the filter criteria was set, the closest lat and long were then set for the custom macro to retrieve and on postback the webpart picked up the new default lat and long and recentered. I'd suggest not modifying the base webpart but clone it and make your changes if you're making changes.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.