Andrewboy
Andrewboy

Reputation: 364

using google map with leaflet plugin

I am a bit newbie in the mashup development. I began to develop my own google map app. After a while i run into one problem,i need to store more markers with the same psoition.Okey lets say the marker cluster class do it, but its not fit for me how it look like.

I found the leaflet plugin which have a nice solution for me. I am bit confused because i don't really understand how could work together with the google map and the leaflet plugin if so.

I tried to implement this solution: https://gist.github.com/crofty/2197701 i also add this line:

var marker = L.marker([51.5, -0.09]).addTo(map);

but i did not see any markers on the map.I don't know why.

I bagan to learn how they can work together but i am not able to do a simply marker in this code at above.Please help me

Upvotes: 0

Views: 2808

Answers (1)

YaFred
YaFred

Reputation: 10008

the solution you quote does not work for me either (it is a very old leaflet version and it's a shame it comes first in google search results)

Anyway, here is a better link to start with: https://github.com/shramov/leaflet-plugins/blob/master/examples/google.html

In my opinion, if you only want to use googlemaps you should use google api. Leaflet is a good option if you want to use openstreetmap or offer a choice to your users.

Upvotes: 1

Related Questions