Script and makefile adjustments for updating extlib
[larjonas-mediagoblin.git] / extlib / leaflet / src / Leaflet.js
blob750a4a5f5877ad316c519aa12b76b76804183695
1 /**
2 * @preserve Copyright (c) 2010-2011, CloudMade, Vladimir Agafonkin
3 * Leaflet is a BSD-licensed JavaScript library for map display and interaction.
4 * See http://cloudmade.github.com/Leaflet/ for more information.
5 */
7 (function(root) {
8 var L = {
9 VERSION: '0.2',
11 ROOT_URL: (function() {
12 var scripts = document.getElementsByTagName('script'),
13 leafletRe = /^(.*\/)leaflet-?([\w-]*)\.js.*$/;
14 for (var i = 0, len = scripts.length; i < len; i++) {
15 var src = scripts[i].src,
16 res = src && src.match(leafletRe);
18 if (res) {
19 if (res[2] == 'include') break;
20 return res[1];
23 return '../../dist/';
24 })(),
26 noConflict: function() {
27 root.L = this._originalL;
28 return this;
31 _originalL: root.L
34 window.L = L;
35 }(this));