WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Google Marker (3 posts)

  1. johnnydev
    Member
    Posted 1 year ago #

    Hi all!,

    I've tried to change a google marker but I failed :(

    I used this code:
    var image2 = 'http://www.4cf.pl/2.0/wordpress/wp-content/uploads/2013/05/restaurant.png';

    and add a line in:
    var marker = new google.maps.Marker({
    position: em_LatLng,
    icon: image2,
    map: maps[map_id]

    but i didn't work. I add those lines in both js files (events-manager.js and events-manager-source.js) because I didn't know which was the correct one. I've seen that marker declaration appeard more than once (in e-m.js in lines 741, 773, 846 and in e-m-s.js in lines 779, 927,962).

    I also tried to add marker.setIcon("http://www.4cf.pl/2.0/wordpress/wp-content/uploads/2013/05/restaurant.png");

    I do not know what I'm doing wrong or what I'm missing.

    Any thougths?

    http://wordpress.org/extend/plugins/events-manager/

  2. angelo
    NetWebLogic Support
    Posted 1 year ago #

    hi,

    you can change that by hooking into the em_maps_location_hook using javascript/jquery - http://wp-events-plugin.com/tutorials/modifying-event-location-google-maps/

  3. johnnydev
    Member
    Posted 1 year ago #

    Hi,

    thx for the tip!

    I manage to change the marker :)
    Just find in events-manager.js "jQuery('.em-locations-map').each( function(index)..." (line 754 or 745 depend on em version) and add
    var image = ...
    and then few line below in marker declaration just add
    icon: image,

    Best Regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic