Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spiderfying doesn't work with Awesome Markers plugin #598

Closed
hokascha opened this issue Nov 10, 2015 · 3 comments
Closed

Spiderfying doesn't work with Awesome Markers plugin #598

hokascha opened this issue Nov 10, 2015 · 3 comments

Comments

@hokascha
Copy link

When using Awesome Markers https://github.com/lvoogdt/Leaflet.awesome-markers to create markers, the spiderfying effect doesn't work. Markers are just faded in&out but not moved.

var markers = new L.MarkerClusterGroup();
$.ajax({
                type: "GET",
                url: "/?p=map&json=1",
                dataType: 'json',
                success: function (response) {
                    geojson = L.geoJson(response, {
                        pointToLayer: function (feature, latlng) {
                               return L.marker(latlng,{icon:     L.AwesomeMarkers.icon({
                                                                             icon: 'circle-o',
                                                                                     markerColor: 'blue',
                                                                             prefix: 'fa'
                                                                             })
                                                      });
                      });
                    markers.addLayer(geojson);
                    map.addLayer(markers);
                }
            });
@ghybs
Copy link
Contributor

ghybs commented Nov 11, 2015

Hi,

If you pay close attention, you will notice that Awesome Markers do not animate either when splitting from / merging into clusters. This is simply because Awesome Markers plugin replaced the leaflet-marker-icon class by awesome-marker-icon (same with -shadow).

Same issue with Extra Markers plugin (which I would recommend over Awesome Markers since it is more recent and offers more options by the way).

You have 2 simple solutions:

Let me know if this does not work for you.

@hokascha
Copy link
Author

Thanks, works!

ghybs added a commit to ghybs/Leaflet.ExtraMarkers that referenced this issue Nov 13, 2015
for compatibility with Leaflet.markercluster animations (see Leaflet/Leaflet.markercluster#598). These classes are used on the default L.Icon.Default, but were omitted in Awesome Markers and Extra Markers. They do not bring any additional styling beyond what Extra Markers assigns to .extra-marker (position: absolute; left: 0; top: 0; user-select: none; display: block;) except for "user-select: none;".
@ghybs
Copy link
Contributor

ghybs commented Nov 13, 2015

Hi,

Just to let you know that Leaflet.ExtraMarkers has just been corrected to include the 2 missing classes.

Awesome-Markers is no longer maintained by its author unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants