Unable to use Leaflet CDN?

Hi,

I am trying to try out Leaflet maps API. I am having trouble though with client js being unable to recognize L object in this example:

var mymap = L.map(‘mapid’).setView([51.505, -0.09], 13);

its from their tutorial on http://leafletjs.com/examples/quick-start/

links to CDN are included in page head and are https… any ideas what might be wrong? is it possible to use leaflet on gomix actually? or openlayers? mapstraction? or any similar map API suggestions?

thanks

copy-pasting their example in index.html on a new gomix project worked for me ( see https://leaflet-example.gomix.me/ )

2 Likes

thanks. it took a bit of time to get it, but yes, it works. so thanks a thousand times, really ! i m really glad i can use leaflet now

where do you have this example from, their git repo? i cant seem to find it on their website so i was wondering for next time i’m in similar situation.

but still client script does not recognize the L object, i still get errors on those even though map is fully functional the same way like in Leaflet’s example.

the example is from the link in your post ( http://leafletjs.com/examples/quick-start/1 ) , just right click, view-source it.

can you post your code so I can take a look ?