juanjoeag
Forum Replies Created
-
The solution is above.
Hi brightonmike
thanks for your comment ??
I tried the same:
$(document).on('em_maps_locations_hook', function (e, map, markers) { $.each(markers, function( index, marker ) { marker.setOptions({icon: myicon}); }); });
And it doesn’t work.
in includes/js/events-manager.js, where define the listener ’em_maps_locations_hook’, is passed the variables/array:
[maps[map_id], data, map_id]data contains the information from the AJAX query to JSON .
With these data, construct the markers array.There is definitely an error in the array that is received with the listener. It is not built correctly.
In previous post are the solution, but changing the core……
I hope this bug is solved in next versions.
Thanks for the great plugin.
Hi Angelo,
doesn’t work correctly.
‘marker’ is a object array.
but if I use this array into markerclusterer don’t recognice like a markers array.
But with the changes I said before work like a charm.
Hi caimin_nwl,
This is for a multi-locations map.
In my first example, I used the same hook that you and angelo told me.
Would you read my code carefully?
$(document).on('em_maps_locations_hook', function (e, map, infowindow, marker) { alert('marker = ' + marker ); });
In this case, We need to receive an array…
thanks again
Make this changes in includes/js/events-manager.js everything works OK.
Around line 847
jQuery(document).triggerHandler('em_maps_locations_hook', [maps[map_id], data, map_id]);
change for this:
jQuery(document).triggerHandler('em_maps_locations_hook', [maps[map_id], infowindow, maps_markers[map_id], map_id]);
this is a bug? Or is misusing the hook?
thanks
Sorry, but I’m already using the hook you’re saying, em_maps_locations_hook.
I do not understand your answer.
In documentation say:
For the global maps, it’s the same principle, except the hook is called em_maps_locations_hook and one variable is supplied which is an array of markers.
where is the markers array?
thanks