Show on Map

By nmsinc - December 1, 2011

[/#000000]Using Geocoder, with a Google map on a CMSB listing page – I have a link labeled “Show On Map” - I only want the Google map pointer to show the location on the map if the link is clicked, this way the map is not cluttered with pointers. [/#000000]

[/#000000]

I also have a need to show all pointers for listings, however, these pointers need to be labeled with markers that match up with the property listings they belong too – such as 123 Harmony Street = “#1” and the map pointer should read “#1”.[/#000000]

[/#000000]

How can this be done in Geocoder?[/#000000]

[/#000000]

Thanks - nmsinc[/#000000]
nmsinc

Re: [nmsinc] Show on Map

By ross - December 2, 2011

Hi nmsinc

Thanks for posting!

I have two ideas for this one. Both of them will involve writing a function to look up the longitude and latitude for one listing at a time and display that.

Where my ideas differ is on how that function is called. One idea would be to just have the page reload each time you click the "Show On Map" point. You'll want to pass the record number of the listing you clicked on via the URL and use it in the function.

The second idea would be to do basically the same thing but use jQuery and AJAX to reload just the map and not the whole page.

Of the two, the first option would be much much easier. AJAX typically doubles the development time :).

Let me know what you think. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [nmsinc] Show on Map

By ross - December 2, 2011

Hi again

Thought of another option :).

You mentioned that part of the reason you want only one at a time is because you have so many listings. I imagine this is happening on a list page somewhere and if that's the case, what you could do is setup pagination so only 10 listings show up on the map at one time and you cycle through the rest 10 at a time.

Would that work?
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/