We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Multiple Markers with Geofinder

Development and Programming

Will Taylor's avatar
Will Taylor
5 posts
13 years ago
Will Taylor's avatar Will Taylor

I am wanting to include multiple markers on one google map, using Geofinder and Geotagger.

Here is my code:

function init_map() {
{exp:channel:entries channel="oddjobz_post" limit="2"}
  var lat = {oddjob_lat};
  var lng = {oddjob_lng};
  var marker_title = '{title}';
{/exp:channel:entries}
     var location = new google.maps.LatLng(lat, lng);
     var myOptions = {
       zoom: 5,
       center: location,
       mapTypeId: google.maps.MapTypeId.ROADMAP
     };
     var map = new google.maps.Map(document.getElementById("map-canvas"),
         myOptions);
 
     var marker = new google.maps.Marker({
         position: location, 
         map: map,
         title: marker_title
     });
   }

Can someone help me extend this to include all available markers set in the parameters of the channel entry?

Thanks in advance

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.