WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager - Changing Google Maps Marker (2 posts)

  1. bunchofapes
    Member
    Posted 1 year ago #

    Hello I am using Events Manager in a WordPress site and am trying to change the Google Maps Marker.

    The Events manager site gives some support but I am having trouble getting my head around it..

    Any help appreciated!

    Thanks

    Dave

  2. bettercallsaul
    Member
    Posted 11 months ago #

    Add your own custom Google map marker, can be done with a single line of code.

    First you have to hook into em_maps_location_hook for single event pages or em_maps_locations_hook for global events

    jQuery(document).ready(function($){
    
    jQuery(document).bind('em_maps_location_hook', function( e, map, infowindow, marker ){		
    
    // Custom Google map marker icon
    marker.setOptions({'icon': 'http://localhost/wordpress/wp-content/themes/Mysite/images/location-marker.png'});			
    
    });

    After 'icon' you have to typ your url. And you have added your own marker.

    Question to developers.

    Is there a way to use something like ({'icon': 'images/location-marker.png'});

    Might be handy when I go online when i am finished developing my site

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.