OSM Geocoder with Leaflet...

154 views
Skip to first unread message

Ahsan Abbas

unread,
Jan 3, 2015, 6:47:51 AM1/3/15
to leafl...@googlegroups.com
This is my complete leaflet code with OSM Geocoder facility, but i got error 'L' is not define at yellow line, can some one tell what's the problem... ? And also tell me some debug method...
Thanks...

<!DOCTYPE html>
<html>
<head>
<title>osmGeocoder Search plugin for Leaflet Map</title>
<meta charset="utf-8"/>
<link rel="stylesheet" type="text/css" href="\leaflet\leaflet.css"/>

</hea
<body>
<div id="map" style="width: 600px; height:400px"></div>

<script type="\leaflet\leaflet.js"></script>
</script>

<script>
var map = L.map('map').setView([-41.2858, 174.78682], 14);
maplink = '<a href="http://openstreetmap.org">OpenStreetMap</a>' ;
L.tileLayer(
attribution: 'Map data &copy; ' + maplink,
maxZoom: 18,
}).addTo(map);

var osmGeocoder = new L.Control.OSMGeocoder();
map.addControl(osmGeocoder);
</script>
</body>
</html>

Alexandru Pufan

unread,
Jan 3, 2015, 7:58:47 AM1/3/15
to leafl...@googlegroups.com
It's not <script type = "......">, it's <script src= ".....">

Ahsan Abbas

unread,
Jan 3, 2015, 8:29:21 AM1/3/15
to leafl...@googlegroups.com
how can i debug the any script ? any compiler...

Mohamed Salim

unread,
Jun 28, 2017, 4:27:22 AM6/28/17
to Leaflet
HEY,CAN YOU SEND HELP ON HOW SOLVE THIS,I GOT THE SAME ERROR IN MY CODE

Arnie Shore

unread,
Jun 28, 2017, 6:09:44 AM6/28/17
to leafl...@googlegroups.com
See the line that should read script src ... .

--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohamed Salim

unread,
Jun 28, 2017, 2:25:12 PM6/28/17
to Leaflet
thanx!
Reply all
Reply to author
Forward
0 new messages