Nominatim/website/js/leaflet-omnivore.min.js

1 line
26 KiB
JavaScript
Raw Normal View History

2015-08-23 01:08:40 +03:00
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.omnivore=e()}}(function(){var e;return function r(e,n,t){function o(u,a){if(!n[u]){if(!e[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[u]={exports:{}};e[u][0].call(c.exports,function(n){var r=e[u][1][n];return o(r?r:n)},c,c.exports,r,e,n,t)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<t.length;u++)o(t[u]);return o}({1:[function(e,n){function r(e,n){"addData"in e&&e.addData(n),"setGeoJSON"in e&&e.setGeoJSON(n)}function t(e,n,t){var o=t||L.geoJson();return m(e,function(e,n){return e?o.fire("error",{error:e}):(r(o,JSON.parse(n.responseText)),void o.fire("ready"))}),o}function o(e,n,r){function t(e,r){return e?o.fire("error",{error:e}):(c(r.responseText,n,o),void o.fire("ready"))}var o=r||L.geoJson();return m(e,t),o}function i(e,n,r){function t(e,r){function t(){i=!0}var i;return e?o.fire("error",{error:e}):(o.on("error",t),l(r.responseText,n,o),o.off("error",t),void(i||o.fire("ready")))}var o=r||L.geoJson();return m(e,t),o}function u(e,n,r){function t(e,r){function t(){i=!0}var i;return e?o.fire("error",{error:e}):(o.on("error",t),p(r.responseXML||r.responseText,n,o),o.off("error",t),void(i||o.fire("ready")))}var o=r||L.geoJson();return m(e,t),o}function a(e,n,r){function t(e,r){function t(){i=!0}var i;return e?o.fire("error",{error:e}):(o.on("error",t),d(r.responseXML||r.responseText,n,o),o.off("error",t),void(i||o.fire("ready")))}var o=r||L.geoJson();return m(e,t),o}function s(e,n,r){function t(e,r){return e?o.fire("error",{error:e}):(h(r.responseText,n,o),void o.fire("ready"))}var o=r||L.geoJson();return m(e,t),o}function f(e,n,r){function t(e,r){return e?o.fire("error",{error:e}):(g(r.responseText,n,o),void o.fire("ready"))}var o=r||L.geoJson();return m(e,t),o}function c(e,n,t){var o="string"==typeof e?JSON.parse(e):e;t=t||L.geoJson();for(var i in o.objects){var u=E.feature(o,o.objects[i]);u.features?r(t,u.features):r(t,u)}return t}function l(e,n,t){function o(e,n){return e?t.fire("error",{error:e}):void r(t,n)}return t=t||L.geoJson(),n=n||{},y.csv2geojson(e,n,o),t}function p(e,n,t){var o=v(e);if(!o)return t.fire("error",{error:"Could not parse GPX"});t=t||L.geoJson();var i=S.gpx(o);return r(t,i),t}function d(e,n,t){var o=v(e);if(!o)return t.fire("error",{error:"Could not parse KML"});t=t||L.geoJson();var i=S.kml(o);return r(t,i),t}function g(e,n,t){t=t||L.geoJson(),n=n||{};for(var o=x.decode(e,n.precision),i={type:"LineString",coordinates:[]},u=0;u<o.length;u++)i.coordinates[u]=[o[u][1],o[u][0]];return r(t,i),t}function h(e,n,t){t=t||L.geoJson();var o=w(e);return r(t,o),t}function v(e){return"string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e}var m=e("corslite"),y=e("csv2geojson"),w=e("wellknown"),x=e("polyline"),E=e("topojson/topojson.js"),S=e("togeojson");n.exports.polyline=f,n.exports.polyline.parse=g,n.exports.geojson=t,n.exports.topojson=o,n.exports.topojson.parse=c,n.exports.csv=i,n.exports.csv.parse=l,n.exports.gpx=u,n.exports.gpx.parse=p,n.exports.kml=a,n.exports.kml.parse=d,n.exports.wkt=s,n.exports.wkt.parse=h},{corslite:5,csv2geojson:6,polyline:9,togeojson:10,"topojson/topojson.js":11,wellknown:12}],2:[function(){},{}],3:[function(e,n){n.exports=e(2)},{"/Users/tmcw/src/leaflet-omnivore/node_modules/browserify/lib/_empty.js":2}],4:[function(e,n){function r(){}var t=n.exports={};t.nextTick=function(){var e="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.MutationObserver,r="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(e)return function(e){return window.setImmediate(e)};var t=[];if(n){var o=document.createElement("div"),i=new MutationObserver(function(){var e=t.slice();t.length=0,e.forEach(function(e){e()})});retu