Wonderful.. there was much discussion on this in a number of posts..
What has been working for me (from a number of posts here on this topic)…
We need to change the core file events-manager.js
the location is /includes/js
So I also have to say that changing core files is not recommended.. as you will need to re-edit after the plugin ugrades.
Make backup of file(s) you would change.
In events-manager.js (from above)…
About line 894
Change jQuery(document).triggerHandler('em_maps_locations_hook', [maps[map_id], data, map_id]);
to…
jQuery(document).triggerHandler('em_maps_locations_hook', [maps[map_id], data, infowindow, maps_markers[map_id], map_id], marker_options[map_id]);
And now the javascript, which we need to have the “markers” with an array.
<script type="text/javascript">
jQuery(document).bind('em_maps_locations_hook', function(e,data,map,infowindow,markers){
//Set marker image and size
var myIcon = new google.maps.MarkerImage("https://yourwebsite/images/the-image.png", null, new google.maps.Point(0,0), new google.maps.Point(16,32), new google.maps.Size(40,48));
//Apply marker to map using array
for (var i = 0; i < markers.length; i++) {
markers[i].setOptions({icon: myIcon});
}
});
</script>
And we put the javascript in the header.php file
Hope that works for you.
-
This reply was modified 7 years, 11 months ago by
Robswaimea.