Guy Davis
2012-Mar-30 19:31 UTC
[Mapstraction] Popups not appearing for leaflet using mxn 2.0.18
Good day, I''m trying out the new Leaflet provider using the 2.0.18 release. Unfortunately, I haven''t been able to get a marker bubble (popup) to appear after clicking on the marker. I think my use of Mapstraction is correct as I see a popup appear for the googlev3, ovi, and openlayers providers when I switch with no other changes to my code. Is there a step I''m missing specific to Leaflet? I tried debugging the click event path but wasn''t able to follow it. Any tips on where to start debugging? I have a pretty simple map with just a few markers, a custom (google-style) icon marker, and a simple HTML bubble text. Thanks in advance, Guy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20120330/e3c031df/attachment.htm>
Guy Davis
2012-Apr-01 19:36 UTC
[Mapstraction] Popups not appearing for leaflet using mxn 2.0.18
For anyone else that runs into this issue with Leaflet, here''s a
temporary
workaround I''m using to explicitly add a click event listener that
opens up
the info bubble:
my_marker.setInfoBubble(createMapBubbleHtml(p));
mapstraction.addMarker(my_marker);
if (mapstraction.api == ''leaflet'') {
my_marker.click.addHandler(function() {
my_marker.openBubble();
});
}
On Fri, Mar 30, 2012 at 1:31 PM, Guy Davis <guydavis.ca at gmail.com>
wrote:
> Good day,
>
> I''m trying out the new Leaflet provider using the 2.0.18 release.
> Unfortunately, I haven''t been able to get a marker bubble (popup)
to
> appear after clicking on the marker. I think my use of Mapstraction is
> correct as I see a popup appear for the googlev3, ovi, and openlayers
> providers when I switch with no other changes to my code.
>
> Is there a step I''m missing specific to Leaflet? I tried
debugging the
> click event path but wasn''t able to follow it. Any tips on where
to start
> debugging? I have a pretty simple map with just a few markers, a custom
> (google-style) icon marker, and a simple HTML bubble text.
>
> Thanks in advance,
> Guy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20120401/51fa3a80/attachment.htm>