From ed594cfdd1a6d9763a3ea6aa623c06b517a953cc Mon Sep 17 00:00:00 2001 From: David Molineus Date: Tue, 17 Oct 2017 09:56:11 +0200 Subject: [PATCH] Update control geocoder to v1.5.5. --- README.md | 2 +- assets/control-geocoder/Control.Geocoder.js | 37 ++++++++++++------- .../control-geocoder/Control.Geocoder.min.js | 2 +- assets/control-geocoder/README.md | 2 +- assets/control-geocoder/bower.json | 6 +-- assets/control-geocoder/package.json | 2 +- .../Control.FullScreen.min.js | 2 +- .../leaflet-providers.min.js | 2 +- module/config/config.php | 2 +- 9 files changed, 34 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index bd9fa7f..8589512 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ This package contains following packages: - [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore) - [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading) - [Leaflet.Control.FullScreen 1.4.3](https://github.com/brunob/leaflet.fullscreen) - - [Leaflet Control Geocoder 1.5.4](https://github.com/perliedman/leaflet-control-geocoder) + - [Leaflet Control Geocoder 1.5.5](https://github.com/perliedman/leaflet-control-geocoder) - [Leaflet.ExtraMarkers 1.0.6](https://github.com/coryasilva/Leaflet.ExtraMarkers) - [osmtogeojson 2.2.12](https://github.com/tyrasd/osmtogeojson) - [spin.js 2.3.2](http://fgnass.github.io/spin.js) diff --git a/assets/control-geocoder/Control.Geocoder.js b/assets/control-geocoder/Control.Geocoder.js index 53af88b..542e54f 100644 --- a/assets/control-geocoder/Control.Geocoder.js +++ b/assets/control-geocoder/Control.Geocoder.js @@ -132,17 +132,19 @@ module.exports = { _geocode: function(suggest) { var requestCount = ++this._requestCount, - mode = suggest ? 'suggest' : 'geocode'; + mode = suggest ? 'suggest' : 'geocode', + eventData = {input: this._input.value}; this._lastGeocode = this._input.value; if (!suggest) { this._clearResults(); } - this.fire('start' + mode); + this.fire('start' + mode, eventData); this.options.geocoder[mode](this._input.value, function(results) { if (requestCount === this._requestCount) { - this.fire('finish' + mode); + eventData.results = results; + this.fire('finish' + mode, eventData); this._geocodeResult(results, suggest); } }, this); @@ -608,18 +610,26 @@ var L = (typeof window !== "undefined" ? window['L'] : typeof global !== "undefi module.exports = { "class": L.Class.extend({ options: { - serviceUrl: 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/' + serviceUrl: 'https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/', + geocodingQueryParams: {}, + reverseQueryParams: {} }, initialize: function(accessToken, options) { L.setOptions(this, options); - this._accessToken = accessToken; + this.options.geocodingQueryParams.access_token = accessToken; + this.options.reverseQueryParams.access_token = accessToken; }, geocode: function(query, cb, context) { - Util.getJSON(this.options.serviceUrl + encodeURIComponent(query) + '.json', { - access_token: this._accessToken - }, function(data) { + var params = this.options.geocodingQueryParams; + if (typeof params.proximity !== 'undefined' + && params.proximity.hasOwnProperty('lat') + && params.proximity.hasOwnProperty('lng')) + { + params.proximity = params.proximity.lng + ',' + params.proximity.lat; + } + Util.getJSON(this.options.serviceUrl + encodeURIComponent(query) + '.json', params, function(data) { var results = [], loc, latLng, @@ -628,7 +638,7 @@ module.exports = { for (var i = 0; i <= data.features.length - 1; i++) { loc = data.features[i]; latLng = L.latLng(loc.center.reverse()); - if(loc.hasOwnProperty('bbox')) + if (loc.hasOwnProperty('bbox')) { latLngBounds = L.latLngBounds(L.latLng(loc.bbox.slice(0, 2).reverse()), L.latLng(loc.bbox.slice(2, 4).reverse())); } @@ -653,9 +663,7 @@ module.exports = { }, reverse: function(location, scale, cb, context) { - Util.getJSON(this.options.serviceUrl + encodeURIComponent(location.lng) + ',' + encodeURIComponent(location.lat) + '.json', { - access_token: this._accessToken - }, function(data) { + Util.getJSON(this.options.serviceUrl + encodeURIComponent(location.lng) + ',' + encodeURIComponent(location.lat) + '.json', this.options.reverseQueryParams, function(data) { var results = [], loc, latLng, @@ -664,7 +672,7 @@ module.exports = { for (var i = 0; i <= data.features.length - 1; i++) { loc = data.features[i]; latLng = L.latLng(loc.center.reverse()); - if(loc.hasOwnProperty('bbox')) + if (loc.hasOwnProperty('bbox')) { latLngBounds = L.latLngBounds(L.latLng(loc.bbox.slice(0, 2).reverse()), L.latLng(loc.bbox.slice(2, 4).reverse())); } @@ -1043,6 +1051,9 @@ module.exports = { results.push({ name: this._deocodeFeatureName(f), + html: this.options.htmlTemplate ? + this.options.htmlTemplate(f) + : undefined, center: latLng, bbox: bbox, properties: f.properties diff --git a/assets/control-geocoder/Control.Geocoder.min.js b/assets/control-geocoder/Control.Geocoder.min.js index a72aa68..3654b27 100644 --- a/assets/control-geocoder/Control.Geocoder.min.js +++ b/assets/control-geocoder/Control.Geocoder.min.js @@ -1 +1 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.leafletControlGeocoder=e()}}(function(){return function e(t,o,n){function s(r,a){if(!o[r]){if(!t[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(i)return i(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[r]={exports:{}};t[r][0].call(d.exports,function(e){var o=t[r][1][e];return s(o?o:e)},d,d.exports,e,t,o,n)}return o[r].exports}for(var i="function"==typeof require&&require,r=0;r0){this._alts.innerHTML="",this._results=e,n.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized");for(var o=0;o=0?this._collapse():this._expand()},_expand:function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("expand")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-geocoder-expanded",""),n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),this.fire("collapse")},_clearResults:function(){n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error")},_createAlt:function(e,t){var o=n.DomUtil.create("li",""),s=n.DomUtil.create("a","",o),i=this.options.showResultIcons&&e.icon?n.DomUtil.create("img","",s):null,r=e.html?void 0:document.createTextNode(e.name),a=function(t){this._preventBlurCollapse=!0,n.DomEvent.stop(t),this._geocodeResultSelected(e),n.DomEvent.on(o,"click",function(){this.options.collapsed&&this._collapse()},this)};return i&&(i.src=e.icon),o.setAttribute("data-result-index",t),e.html?s.innerHTML=s.innerHTML+e.html:s.appendChild(r),n.DomEvent.addListener(o,"mousedown",a,this),o},_keydown:function(e){var t=this,o=function(e){t._selection&&(n.DomUtil.removeClass(t._selection,"leaflet-control-geocoder-selected"),t._selection=t._selection[e>0?"nextSibling":"previousSibling"]),t._selection||(t._selection=t._alts[e>0?"firstChild":"lastChild"]),t._selection&&n.DomUtil.addClass(t._selection,"leaflet-control-geocoder-selected")};switch(e.keyCode){case 27:this.options.collapsed&&this._collapse();break;case 38:o(-1),n.DomEvent.preventDefault(e);break;case 40:o(1),n.DomEvent.preventDefault(e);break;case 13:if(this._selection){var s=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[s]),this._clearResults()}else this._geocode();n.DomEvent.preventDefault(e);break;default:var i=this._input.value;this.options.geocoder.suggest&&i!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),i.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout(n.bind(function(){this._geocode(!0)},this),this.options.suggestTimeout):this._clearResults())}}}),factory:function(e){return new n.Control.Geocoder(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./geocoders/nominatim":9}],2:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{service_url:"http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"},initialize:function(e,t){n.setOptions(this,t),this._accessToken=e},geocode:function(e,t,o){var i={SingleLine:e,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"};this._key&&this._key.length&&(i.token=this._key),s.getJSON(this.options.service_url+"/findAddressCandidates",i,function(e){var s,i,r,a=[];if(e.candidates&&e.candidates.length)for(var l=0;l<=e.candidates.length-1;l++)s=e.candidates[l],i=n.latLng(s.location.y,s.location.x),r=n.latLngBounds(n.latLng(s.extent.ymax,s.extent.xmax),n.latLng(s.extent.ymin,s.extent.xmin)),a[l]={name:s.address,bbox:r,center:i};t.call(o,a)})},suggest:function(e,t,o){return this.geocode(e,t,o)},reverse:function(e,t,o,i){var r={location:encodeURIComponent(e.lng)+","+encodeURIComponent(e.lat),distance:100,f:"json"};s.getJSON(this.options.service_url+"/reverseGeocode",r,function(e){var t,s=[];e&&!e.error&&(t=n.latLng(e.location.y,e.location.x),s.push({name:e.address.Match_addr,center:t,bounds:n.latLngBounds(t,t)})),o.call(i,s)})}}),factory:function(e,t){return new n.Control.Geocoder.ArcGis(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],3:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({initialize:function(e){this.key=e},geocode:function(e,t,o){s.jsonp("https://dev.virtualearth.net/REST/v1/Locations",{query:e,key:this.key},function(e){var s=[];if(e.resourceSets.length>0)for(var i=e.resourceSets[0].resources.length-1;i>=0;i--){var r=e.resourceSets[0].resources[i],a=r.bbox;s[i]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}t.call(o,s)},this,"jsonp")},reverse:function(e,t,o,i){s.jsonp("//dev.virtualearth.net/REST/v1/Locations/"+e.lat+","+e.lng,{key:this.key},function(e){for(var t=[],s=e.resourceSets[0].resources.length-1;s>=0;s--){var r=e.resourceSets[0].resources[s],a=r.bbox;t[s]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}o.call(i,t)},this,"jsonp")}}),factory:function(e){return new n.Control.Geocoder.Bing(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],4:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://maps.googleapis.com/maps/api/geocode/json",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e,t){this._key=e,n.setOptions(this,t),this.options.serviceUrl=this.options.service_url||this.options.serviceUrl},geocode:function(e,t,o){var i={address:e};this._key&&this._key.length&&(i.key=this._key),i=n.Util.extend(i,this.options.geocodingQueryParams),s.getJSON(this.options.serviceUrl,i,function(e){var s,i,r,a=[];if(e.results&&e.results.length)for(var l=0;l<=e.results.length-1;l++)s=e.results[l],i=n.latLng(s.geometry.location),r=n.latLngBounds(n.latLng(s.geometry.viewport.northeast),n.latLng(s.geometry.viewport.southwest)),a[l]={name:s.formatted_address,bbox:r,center:i,properties:s.address_components};t.call(o,a)})},reverse:function(e,t,o,i){var r={latlng:encodeURIComponent(e.lat)+","+encodeURIComponent(e.lng)};r=n.Util.extend(r,this.options.reverseQueryParams),this._key&&this._key.length&&(r.key=this._key),s.getJSON(this.options.serviceUrl,r,function(e){var t,s,r,a=[];if(e.results&&e.results.length)for(var l=0;l<=e.results.length-1;l++)t=e.results[l],s=n.latLng(t.geometry.location),r=n.latLngBounds(n.latLng(t.geometry.viewport.northeast),n.latLng(t.geometry.viewport.southwest)),a[l]={name:t.formatted_address,bbox:r,center:s,properties:t.address_components};o.call(i,a)})}}),factory:function(e,t){return new n.Control.Geocoder.Google(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],5:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{geocodeUrl:"http://geocoder.api.here.com/6.2/geocode.json",reverseGeocodeUrl:"http://reverse.geocoder.api.here.com/6.2/reversegeocode.json",app_id:"",app_code:"",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e){n.setOptions(this,e)},geocode:function(e,t,o){var s={searchtext:e,gen:9,app_id:this.options.app_id,app_code:this.options.app_code,jsonattributes:1};s=n.Util.extend(s,this.options.geocodingQueryParams),this.getJSON(this.options.geocodeUrl,s,t,o)},reverse:function(e,t,o,s){var i={prox:encodeURIComponent(e.lat)+","+encodeURIComponent(e.lng),mode:"retrieveAddresses",app_id:this.options.app_id,app_code:this.options.app_code,gen:9,jsonattributes:1};i=n.Util.extend(i,this.options.reverseQueryParams),this.getJSON(this.options.reverseGeocodeUrl,i,o,s)},getJSON:function(e,t,o,i){s.getJSON(e,t,function(e){var t,s,r,a=[];if(e.response.view&&e.response.view.length)for(var l=0;l<=e.response.view[0].result.length-1;l++)t=e.response.view[0].result[l].location,s=n.latLng(t.displayPosition.latitude,t.displayPosition.longitude),r=n.latLngBounds(n.latLng(t.mapView.topLeft.latitude,t.mapView.topLeft.longitude),n.latLng(t.mapView.bottomRight.latitude,t.mapView.bottomRight.longitude)),a[l]={name:t.address.label,bbox:r,center:s};o.call(i,a)})}}),factory:function(e){return new n.Control.Geocoder.HERE(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],6:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/"},initialize:function(e,t){n.setOptions(this,t),this._accessToken=e},geocode:function(e,t,o){s.getJSON(this.options.serviceUrl+encodeURIComponent(e)+".json",{access_token:this._accessToken},function(e){var s,i,r,a=[];if(e.features&&e.features.length)for(var l=0;l<=e.features.length-1;l++)s=e.features[l],i=n.latLng(s.center.reverse()),r=s.hasOwnProperty("bbox")?n.latLngBounds(n.latLng(s.bbox.slice(0,2).reverse()),n.latLng(s.bbox.slice(2,4).reverse())):n.latLngBounds(i,i),a[l]={name:s.place_name,bbox:r,center:i};t.call(o,a)})},suggest:function(e,t,o){return this.geocode(e,t,o)},reverse:function(e,t,o,i){s.getJSON(this.options.serviceUrl+encodeURIComponent(e.lng)+","+encodeURIComponent(e.lat)+".json",{access_token:this._accessToken},function(e){var t,s,r,a=[];if(e.features&&e.features.length)for(var l=0;l<=e.features.length-1;l++)t=e.features[l],s=n.latLng(t.center.reverse()),r=t.hasOwnProperty("bbox")?n.latLngBounds(n.latLng(t.bbox.slice(0,2).reverse()),n.latLng(t.bbox.slice(2,4).reverse())):n.latLngBounds(s,s),a[l]={name:t.place_name,bbox:r,center:s};o.call(i,a)})}}),factory:function(e,t){return new n.Control.Geocoder.Mapbox(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],7:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://www.mapquestapi.com/geocoding/v1"},initialize:function(e,t){this._key=decodeURIComponent(e),n.Util.setOptions(this,t)},_formatName:function(){var e,t=[];for(e=0;e=0;a--)s=e.results[0].locations[a],i=n.latLng(s.latLng),r[a]={name:this._formatName(s.street,s.adminArea4,s.adminArea3,s.adminArea1),bbox:n.latLngBounds(i,i),center:i};t.call(o,r)},this)},reverse:function(e,t,o,i){s.jsonp(this.options.serviceUrl+"/reverse",{key:this._key,location:e.lat+","+e.lng,outputFormat:"json"},function(e){var t,s,r=[];if(e.results&&e.results[0].locations)for(var a=e.results[0].locations.length-1;a>=0;a--)t=e.results[0].locations[a],s=n.latLng(t.latLng),r[a]={name:this._formatName(t.street,t.adminArea4,t.adminArea3,t.adminArea1),bbox:n.latLngBounds(s,s),center:s};o.call(i,r)},this)}}),factory:function(e,t){return new n.Control.Geocoder.MapQuest(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],8:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://search.mapzen.com/v1",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e,t){n.Util.setOptions(this,t),this._apiKey=e,this._lastSuggest=0},geocode:function(e,t,o){var i=this;s.getJSON(this.options.serviceUrl+"/search",n.extend({api_key:this._apiKey,text:e},this.options.geocodingQueryParams),function(e){t.call(o,i._parseResults(e,"bbox"))})},suggest:function(e,t,o){var i=this;s.getJSON(this.options.serviceUrl+"/autocomplete",n.extend({api_key:this._apiKey,text:e},this.options.geocodingQueryParams),n.bind(function(e){e.geocoding.timestamp>this._lastSuggest&&(this._lastSuggest=e.geocoding.timestamp,t.call(o,i._parseResults(e,"bbox")))},this))},reverse:function(e,t,o,i){var r=this;s.getJSON(this.options.serviceUrl+"/reverse",n.extend({api_key:this._apiKey,"point.lat":e.lat,"point.lon":e.lng},this.options.reverseQueryParams),function(e){o.call(i,r._parseResults(e,"bounds"))})},_parseResults:function(e,t){var o=[];return n.geoJson(e,{pointToLayer:function(e,t){return n.circleMarker(t)},onEachFeature:function(e,s){var i,r,a={};s.getBounds?(i=s.getBounds(),r=i.getCenter()):(r=s.getLatLng(),i=n.latLngBounds(r,r)),a.name=s.feature.properties.label,a.center=r,a[t]=i,a.properties=s.feature.properties,o.push(a)}}),o}}),factory:function(e,t){return new n.Control.Geocoder.Mapzen(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],9:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://nominatim.openstreetmap.org/",geocodingQueryParams:{},reverseQueryParams:{},htmlTemplate:function(e){var t=e.address,o=[];return(t.road||t.building)&&o.push("{building} {road} {house_number}"),(t.city||t.town||t.village||t.hamlet)&&o.push('{postcode} {city} {town} {village} {hamlet}'),(t.state||t.country)&&o.push('{state} {country}'),s.template(o.join("
"),t,!0)}},initialize:function(e){n.Util.setOptions(this,e)},geocode:function(e,t,o){s.jsonp(this.options.serviceUrl+"search",n.extend({q:e,limit:5,format:"json",addressdetails:1},this.options.geocodingQueryParams),function(e){for(var s=[],i=e.length-1;i>=0;i--){for(var r=e[i].boundingbox,a=0;a<4;a++)r[a]=parseFloat(r[a]);s[i]={icon:e[i].icon,name:e[i].display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e[i]):void 0,bbox:n.latLngBounds([r[0],r[2]],[r[1],r[3]]),center:n.latLng(e[i].lat,e[i].lon),properties:e[i]}}t.call(o,s)},this,"json_callback")},reverse:function(e,t,o,i){s.jsonp(this.options.serviceUrl+"reverse",n.extend({lat:e.lat,lon:e.lng,zoom:Math.round(Math.log(t/256)/Math.log(2)),addressdetails:1,format:"json"},this.options.reverseQueryParams),function(e){var t,s=[];e&&e.lat&&e.lon&&(t=n.latLng(e.lat,e.lon),s.push({name:e.display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e):void 0,center:t,bounds:n.latLngBounds(t,t),properties:e})),o.call(i,s)},this,"json_callback")}}),factory:function(e){return new n.Control.Geocoder.Nominatim(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],10:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://photon.komoot.de/api/",reverseUrl:"https://photon.komoot.de/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},initialize:function(e){n.setOptions(this,e)},geocode:function(e,t,o){var i=n.extend({q:e},this.options.geocodingQueryParams);s.getJSON(this.options.serviceUrl,i,n.bind(function(e){t.call(o,this._decodeFeatures(e))},this))},suggest:function(e,t,o){return this.geocode(e,t,o)},reverse:function(e,t,o,i){var r=n.extend({lat:e.lat,lon:e.lng},this.options.geocodingQueryParams);s.getJSON(this.options.reverseUrl,r,n.bind(function(e){o.call(i,this._decodeFeatures(e))},this))},_decodeFeatures:function(e){var t,o,s,i,r,a,l=[];if(e&&e.features)for(t=0;t"'`]/g,o=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};return function(n){return null==n?"":n?(n=""+n,o.test(n)?n.replace(t,e):n):n+""}}();t.exports={jsonp:function(e,t,s,i,r){var a="_l_geocoder_"+n++;t[r||"callback"]=a,window[a]=o.Util.bind(s,i);var l=document.createElement("script");l.type="text/javascript",l.src=e+o.Util.getParamString(t),l.id=a,document.getElementsByTagName("head")[0].appendChild(l)},getJSON:function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState)return 200!==s.status&&304!==s.status?void n(""):void n(JSON.parse(s.response))},s.open("GET",e+o.Util.getParamString(t),!0),s.setRequestHeader("Accept","application/json"),s.send(null)},template:function(e,t){return e.replace(/\{ *([\w_]+) *\}/g,function(e,o){var n=t[o];return void 0===n?n="":"function"==typeof n&&(n=n(t)),s(n)})},htmlEscape:s}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[12])(12)}); \ No newline at end of file +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.leafletControlGeocoder=e()}}(function(){return function e(t,o,n){function s(r,a){if(!o[r]){if(!t[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(i)return i(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var d=o[r]={exports:{}};t[r][0].call(d.exports,function(e){var o=t[r][1][e];return s(o||e)},d,d.exports,e,t,o,n)}return o[r].exports}for(var i="function"==typeof require&&require,r=0;r0){this._alts.innerHTML="",this._results=e,n.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized");for(var o=0;o=0?this._collapse():this._expand()},_expand:function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-expanded"),this._input.select(),this.fire("expand")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-geocoder-expanded",""),n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error"),this.fire("collapse")},_clearResults:function(){n.DomUtil.addClass(this._alts,"leaflet-control-geocoder-alternatives-minimized"),this._selection=null,n.DomUtil.removeClass(this._errorElement,"leaflet-control-geocoder-error")},_createAlt:function(e,t){var o=n.DomUtil.create("li",""),s=n.DomUtil.create("a","",o),i=this.options.showResultIcons&&e.icon?n.DomUtil.create("img","",s):null,r=e.html?void 0:document.createTextNode(e.name),a=function(t){this._preventBlurCollapse=!0,n.DomEvent.stop(t),this._geocodeResultSelected(e),n.DomEvent.on(o,"click",function(){this.options.collapsed&&this._collapse()},this)};return i&&(i.src=e.icon),o.setAttribute("data-result-index",t),e.html?s.innerHTML=s.innerHTML+e.html:s.appendChild(r),n.DomEvent.addListener(o,"mousedown",a,this),o},_keydown:function(e){var t=this,o=function(e){t._selection&&(n.DomUtil.removeClass(t._selection,"leaflet-control-geocoder-selected"),t._selection=t._selection[e>0?"nextSibling":"previousSibling"]),t._selection||(t._selection=t._alts[e>0?"firstChild":"lastChild"]),t._selection&&n.DomUtil.addClass(t._selection,"leaflet-control-geocoder-selected")};switch(e.keyCode){case 27:this.options.collapsed&&this._collapse();break;case 38:o(-1),n.DomEvent.preventDefault(e);break;case 40:o(1),n.DomEvent.preventDefault(e);break;case 13:if(this._selection){var s=parseInt(this._selection.getAttribute("data-result-index"),10);this._geocodeResultSelected(this._results[s]),this._clearResults()}else this._geocode();n.DomEvent.preventDefault(e);break;default:var i=this._input.value;this.options.geocoder.suggest&&i!==this._lastGeocode&&(clearTimeout(this._suggestTimeout),i.length>=this.options.suggestMinLength?this._suggestTimeout=setTimeout(n.bind(function(){this._geocode(!0)},this),this.options.suggestTimeout):this._clearResults())}}}),factory:function(e){return new n.Control.Geocoder(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./geocoders/nominatim":9}],2:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{service_url:"http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer"},initialize:function(e,t){n.setOptions(this,t),this._accessToken=e},geocode:function(e,t,o){var i={SingleLine:e,outFields:"Addr_Type",forStorage:!1,maxLocations:10,f:"json"};this._key&&this._key.length&&(i.token=this._key),s.getJSON(this.options.service_url+"/findAddressCandidates",i,function(e){var s,i,r,a=[];if(e.candidates&&e.candidates.length)for(var l=0;l<=e.candidates.length-1;l++)s=e.candidates[l],i=n.latLng(s.location.y,s.location.x),r=n.latLngBounds(n.latLng(s.extent.ymax,s.extent.xmax),n.latLng(s.extent.ymin,s.extent.xmin)),a[l]={name:s.address,bbox:r,center:i};t.call(o,a)})},suggest:function(e,t,o){return this.geocode(e,t,o)},reverse:function(e,t,o,i){var r={location:encodeURIComponent(e.lng)+","+encodeURIComponent(e.lat),distance:100,f:"json"};s.getJSON(this.options.service_url+"/reverseGeocode",r,function(e){var t,s=[];e&&!e.error&&(t=n.latLng(e.location.y,e.location.x),s.push({name:e.address.Match_addr,center:t,bounds:n.latLngBounds(t,t)})),o.call(i,s)})}}),factory:function(e,t){return new n.Control.Geocoder.ArcGis(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],3:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({initialize:function(e){this.key=e},geocode:function(e,t,o){s.jsonp("https://dev.virtualearth.net/REST/v1/Locations",{query:e,key:this.key},function(e){var s=[];if(e.resourceSets.length>0)for(var i=e.resourceSets[0].resources.length-1;i>=0;i--){var r=e.resourceSets[0].resources[i],a=r.bbox;s[i]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}t.call(o,s)},this,"jsonp")},reverse:function(e,t,o,i){s.jsonp("//dev.virtualearth.net/REST/v1/Locations/"+e.lat+","+e.lng,{key:this.key},function(e){for(var t=[],s=e.resourceSets[0].resources.length-1;s>=0;s--){var r=e.resourceSets[0].resources[s],a=r.bbox;t[s]={name:r.name,bbox:n.latLngBounds([a[0],a[1]],[a[2],a[3]]),center:n.latLng(r.point.coordinates)}}o.call(i,t)},this,"jsonp")}}),factory:function(e){return new n.Control.Geocoder.Bing(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],4:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://maps.googleapis.com/maps/api/geocode/json",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e,t){this._key=e,n.setOptions(this,t),this.options.serviceUrl=this.options.service_url||this.options.serviceUrl},geocode:function(e,t,o){var i={address:e};this._key&&this._key.length&&(i.key=this._key),i=n.Util.extend(i,this.options.geocodingQueryParams),s.getJSON(this.options.serviceUrl,i,function(e){var s,i,r,a=[];if(e.results&&e.results.length)for(var l=0;l<=e.results.length-1;l++)s=e.results[l],i=n.latLng(s.geometry.location),r=n.latLngBounds(n.latLng(s.geometry.viewport.northeast),n.latLng(s.geometry.viewport.southwest)),a[l]={name:s.formatted_address,bbox:r,center:i,properties:s.address_components};t.call(o,a)})},reverse:function(e,t,o,i){var r={latlng:encodeURIComponent(e.lat)+","+encodeURIComponent(e.lng)};r=n.Util.extend(r,this.options.reverseQueryParams),this._key&&this._key.length&&(r.key=this._key),s.getJSON(this.options.serviceUrl,r,function(e){var t,s,r,a=[];if(e.results&&e.results.length)for(var l=0;l<=e.results.length-1;l++)t=e.results[l],s=n.latLng(t.geometry.location),r=n.latLngBounds(n.latLng(t.geometry.viewport.northeast),n.latLng(t.geometry.viewport.southwest)),a[l]={name:t.formatted_address,bbox:r,center:s,properties:t.address_components};o.call(i,a)})}}),factory:function(e,t){return new n.Control.Geocoder.Google(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],5:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{geocodeUrl:"http://geocoder.api.here.com/6.2/geocode.json",reverseGeocodeUrl:"http://reverse.geocoder.api.here.com/6.2/reversegeocode.json",app_id:"",app_code:"",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e){n.setOptions(this,e)},geocode:function(e,t,o){var s={searchtext:e,gen:9,app_id:this.options.app_id,app_code:this.options.app_code,jsonattributes:1};s=n.Util.extend(s,this.options.geocodingQueryParams),this.getJSON(this.options.geocodeUrl,s,t,o)},reverse:function(e,t,o,s){var i={prox:encodeURIComponent(e.lat)+","+encodeURIComponent(e.lng),mode:"retrieveAddresses",app_id:this.options.app_id,app_code:this.options.app_code,gen:9,jsonattributes:1};i=n.Util.extend(i,this.options.reverseQueryParams),this.getJSON(this.options.reverseGeocodeUrl,i,o,s)},getJSON:function(e,t,o,i){s.getJSON(e,t,function(e){var t,s,r,a=[];if(e.response.view&&e.response.view.length)for(var l=0;l<=e.response.view[0].result.length-1;l++)t=e.response.view[0].result[l].location,s=n.latLng(t.displayPosition.latitude,t.displayPosition.longitude),r=n.latLngBounds(n.latLng(t.mapView.topLeft.latitude,t.mapView.topLeft.longitude),n.latLng(t.mapView.bottomRight.latitude,t.mapView.bottomRight.longitude)),a[l]={name:t.address.label,bbox:r,center:s};o.call(i,a)})}}),factory:function(e){return new n.Control.Geocoder.HERE(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],6:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://api.tiles.mapbox.com/v4/geocode/mapbox.places-v1/",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e,t){n.setOptions(this,t),this.options.geocodingQueryParams.access_token=e,this.options.reverseQueryParams.access_token=e},geocode:function(e,t,o){var i=this.options.geocodingQueryParams;void 0!==i.proximity&&i.proximity.hasOwnProperty("lat")&&i.proximity.hasOwnProperty("lng")&&(i.proximity=i.proximity.lng+","+i.proximity.lat),s.getJSON(this.options.serviceUrl+encodeURIComponent(e)+".json",i,function(e){var s,i,r,a=[];if(e.features&&e.features.length)for(var l=0;l<=e.features.length-1;l++)s=e.features[l],i=n.latLng(s.center.reverse()),r=s.hasOwnProperty("bbox")?n.latLngBounds(n.latLng(s.bbox.slice(0,2).reverse()),n.latLng(s.bbox.slice(2,4).reverse())):n.latLngBounds(i,i),a[l]={name:s.place_name,bbox:r,center:i};t.call(o,a)})},suggest:function(e,t,o){return this.geocode(e,t,o)},reverse:function(e,t,o,i){s.getJSON(this.options.serviceUrl+encodeURIComponent(e.lng)+","+encodeURIComponent(e.lat)+".json",this.options.reverseQueryParams,function(e){var t,s,r,a=[];if(e.features&&e.features.length)for(var l=0;l<=e.features.length-1;l++)t=e.features[l],s=n.latLng(t.center.reverse()),r=t.hasOwnProperty("bbox")?n.latLngBounds(n.latLng(t.bbox.slice(0,2).reverse()),n.latLng(t.bbox.slice(2,4).reverse())):n.latLngBounds(s,s),a[l]={name:t.place_name,bbox:r,center:s};o.call(i,a)})}}),factory:function(e,t){return new n.Control.Geocoder.Mapbox(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],7:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://www.mapquestapi.com/geocoding/v1"},initialize:function(e,t){this._key=decodeURIComponent(e),n.Util.setOptions(this,t)},_formatName:function(){var e,t=[];for(e=0;e=0;a--)s=e.results[0].locations[a],i=n.latLng(s.latLng),r[a]={name:this._formatName(s.street,s.adminArea4,s.adminArea3,s.adminArea1),bbox:n.latLngBounds(i,i),center:i};t.call(o,r)},this)},reverse:function(e,t,o,i){s.jsonp(this.options.serviceUrl+"/reverse",{key:this._key,location:e.lat+","+e.lng,outputFormat:"json"},function(e){var t,s,r=[];if(e.results&&e.results[0].locations)for(var a=e.results[0].locations.length-1;a>=0;a--)t=e.results[0].locations[a],s=n.latLng(t.latLng),r[a]={name:this._formatName(t.street,t.adminArea4,t.adminArea3,t.adminArea1),bbox:n.latLngBounds(s,s),center:s};o.call(i,r)},this)}}),factory:function(e,t){return new n.Control.Geocoder.MapQuest(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],8:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://search.mapzen.com/v1",geocodingQueryParams:{},reverseQueryParams:{}},initialize:function(e,t){n.Util.setOptions(this,t),this._apiKey=e,this._lastSuggest=0},geocode:function(e,t,o){var i=this;s.getJSON(this.options.serviceUrl+"/search",n.extend({api_key:this._apiKey,text:e},this.options.geocodingQueryParams),function(e){t.call(o,i._parseResults(e,"bbox"))})},suggest:function(e,t,o){var i=this;s.getJSON(this.options.serviceUrl+"/autocomplete",n.extend({api_key:this._apiKey,text:e},this.options.geocodingQueryParams),n.bind(function(e){e.geocoding.timestamp>this._lastSuggest&&(this._lastSuggest=e.geocoding.timestamp,t.call(o,i._parseResults(e,"bbox")))},this))},reverse:function(e,t,o,i){var r=this;s.getJSON(this.options.serviceUrl+"/reverse",n.extend({api_key:this._apiKey,"point.lat":e.lat,"point.lon":e.lng},this.options.reverseQueryParams),function(e){o.call(i,r._parseResults(e,"bounds"))})},_parseResults:function(e,t){var o=[];return n.geoJson(e,{pointToLayer:function(e,t){return n.circleMarker(t)},onEachFeature:function(e,s){var i,r,a={};s.getBounds?(i=s.getBounds(),r=i.getCenter()):(r=s.getLatLng(),i=n.latLngBounds(r,r)),a.name=s.feature.properties.label,a.center=r,a[t]=i,a.properties=s.feature.properties,o.push(a)}}),o}}),factory:function(e,t){return new n.Control.Geocoder.Mapzen(e,t)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],9:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://nominatim.openstreetmap.org/",geocodingQueryParams:{},reverseQueryParams:{},htmlTemplate:function(e){var t=e.address,o=[];return(t.road||t.building)&&o.push("{building} {road} {house_number}"),(t.city||t.town||t.village||t.hamlet)&&o.push('{postcode} {city} {town} {village} {hamlet}'),(t.state||t.country)&&o.push('{state} {country}'),s.template(o.join("
"),t,!0)}},initialize:function(e){n.Util.setOptions(this,e)},geocode:function(e,t,o){s.jsonp(this.options.serviceUrl+"search",n.extend({q:e,limit:5,format:"json",addressdetails:1},this.options.geocodingQueryParams),function(e){for(var s=[],i=e.length-1;i>=0;i--){for(var r=e[i].boundingbox,a=0;a<4;a++)r[a]=parseFloat(r[a]);s[i]={icon:e[i].icon,name:e[i].display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e[i]):void 0,bbox:n.latLngBounds([r[0],r[2]],[r[1],r[3]]),center:n.latLng(e[i].lat,e[i].lon),properties:e[i]}}t.call(o,s)},this,"json_callback")},reverse:function(e,t,o,i){s.jsonp(this.options.serviceUrl+"reverse",n.extend({lat:e.lat,lon:e.lng,zoom:Math.round(Math.log(t/256)/Math.log(2)),addressdetails:1,format:"json"},this.options.reverseQueryParams),function(e){var t,s=[];e&&e.lat&&e.lon&&(t=n.latLng(e.lat,e.lon),s.push({name:e.display_name,html:this.options.htmlTemplate?this.options.htmlTemplate(e):void 0,center:t,bounds:n.latLngBounds(t,t),properties:e})),o.call(i,s)},this,"json_callback")}}),factory:function(e){return new n.Control.Geocoder.Nominatim(e)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../util":13}],10:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("../util");t.exports={class:n.Class.extend({options:{serviceUrl:"https://photon.komoot.de/api/",reverseUrl:"https://photon.komoot.de/reverse/",nameProperties:["name","street","suburb","hamlet","town","city","state","country"]},initialize:function(e){n.setOptions(this,e)},geocode:function(e,t,o){var i=n.extend({q:e},this.options.geocodingQueryParams);s.getJSON(this.options.serviceUrl,i,n.bind(function(e){t.call(o,this._decodeFeatures(e))},this))},suggest:function(e,t,o){return this.geocode(e,t,o)},reverse:function(e,t,o,i){var r=n.extend({lat:e.lat,lon:e.lng},this.options.geocodingQueryParams);s.getJSON(this.options.reverseUrl,r,n.bind(function(e){o.call(i,this._decodeFeatures(e))},this))},_decodeFeatures:function(e){var t,o,s,i,r,a,l=[];if(e&&e.features)for(t=0;t"'`]/g,o=/[&<>"'`]/,n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};return function(n){return null==n?"":n?(n=""+n,o.test(n)?n.replace(t,e):n):n+""}}();t.exports={jsonp:function(e,t,s,i,r){var a="_l_geocoder_"+n++;t[r||"callback"]=a,window[a]=o.Util.bind(s,i);var l=document.createElement("script");l.type="text/javascript",l.src=e+o.Util.getParamString(t),l.id=a,document.getElementsByTagName("head")[0].appendChild(l)},getJSON:function(e,t,n){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState)return 200!==s.status&&304!==s.status?void n(""):void n(JSON.parse(s.response))},s.open("GET",e+o.Util.getParamString(t),!0),s.setRequestHeader("Accept","application/json"),s.send(null)},template:function(e,t){return e.replace(/\{ *([\w_]+) *\}/g,function(e,o){var n=t[o];return void 0===n?n="":"function"==typeof n&&(n=n(t)),s(n)})},htmlEscape:s}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[12])(12)}); \ No newline at end of file diff --git a/assets/control-geocoder/README.md b/assets/control-geocoder/README.md index bf8e556..27c5b16 100755 --- a/assets/control-geocoder/README.md +++ b/assets/control-geocoder/README.md @@ -160,7 +160,7 @@ An object that represents a result from a geocoding query. | Property | Type | Description | | ---------- | ---------------- | ------------------------------------- | | name | String | Name of found location | -| bounds | L.LatLngBounds | The bounds of the location | +| bbox | L.LatLngBounds | The bounds of the location | | center | L.LatLng | The center coordinate of the location | | icon | String | URL for icon representing result; optional | | html | String | (optional) HTML formatted representation of the name | diff --git a/assets/control-geocoder/bower.json b/assets/control-geocoder/bower.json index daf7980..92e65c7 100755 --- a/assets/control-geocoder/bower.json +++ b/assets/control-geocoder/bower.json @@ -1,14 +1,14 @@ { "name": "leaflet-control-geocoder", - "version": "1.5.4", + "version": "1.5.5", "homepage": "https://github.com/perliedman/leaflet-control-geocoder", "authors": [ "Per Liedman " ], "description": "Extendable geocoder with builtin OSM/Nominatim support", "main": [ - "Control.Geocoder.js", - "Control.Geocoder.css", + "dist/Control.Geocoder.js", + "dist/Control.Geocoder.css", "images/geocoder.png", "images/throbber.gif" ], diff --git a/assets/control-geocoder/package.json b/assets/control-geocoder/package.json index e4e3c4d..c7deb52 100644 --- a/assets/control-geocoder/package.json +++ b/assets/control-geocoder/package.json @@ -1,6 +1,6 @@ { "name": "leaflet-control-geocoder", - "version": "1.5.4", + "version": "1.5.5", "description": "Extendable geocoder with builtin support for Nominatim, Bing, Google, Mapbox, Photon, What3Words, MapQuest, Mapzen, HERE", "main": "dist/Control.Geocoder.js", "scripts": { diff --git a/assets/leaflet-fullscreen/Control.FullScreen.min.js b/assets/leaflet-fullscreen/Control.FullScreen.min.js index 5809989..34a5c5d 100644 --- a/assets/leaflet-fullscreen/Control.FullScreen.min.js +++ b/assets/leaflet-fullscreen/Control.FullScreen.min.js @@ -1 +1 @@ -!function(){L.Control.FullScreen=L.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},onAdd:function(e){var n,t="leaflet-control-zoom-fullscreen",l="";return n=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:t+=" fullscreen-icon",this._createButton(this.options.title,t,l,n,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),n},_createButton:function(n,t,l,r,i,s){return this.link=L.DomUtil.create("a",t,r),this.link.href="#",this.link.title=n,this.link.innerHTML=l,L.DomEvent.addListener(this.link,"click",L.DomEvent.stopPropagation).addListener(this.link,"click",L.DomEvent.preventDefault).addListener(this.link,"click",i,s),L.DomEvent.addListener(r,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(r,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(r,e.fullScreenEventName,this._handleEscKey,s),L.DomEvent.addListener(document,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(document,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(document,e.fullScreenEventName,this._handleEscKey,s),this.link},toggleFullScreen:function(){var n=this._map;n._exitFired=!1,n._isFullscreen?(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.cancelFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:n._container):L.DomUtil.removeClass(n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize(),n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1):(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:n._container):L.DomUtil.addClass(n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize(),n.fire("enterFullscreen"),n._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleEscKey:function(){var n=this._map;e.isFullScreen(n)||n._exitFired||(n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1)}}),L.Map.addInitHook(function(){this.options.fullscreenControl&&(this.fullscreenControl=L.control.fullscreen(this.options.fullscreenControlOptions),this.addControl(this.fullscreenControl))}),L.control.fullscreen=function(e){return new L.Control.FullScreen(e)};var e={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},n="webkit moz o ms khtml".split(" ");if("undefined"!=typeof document.exitFullscreen)e.supportsFullScreen=!0;else{for(var t=0,l=n.length;tOpenStreetMap'},variants:{Mapnik:{},BlackAndWhite:{url:"http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png",options:{maxZoom:18}},DE:{url:"//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",options:{maxZoom:18}},France:{url:"//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",options:{maxZoom:20,attribution:"© Openstreetmap France | {attribution.OpenStreetMap}"}},HOT:{url:"//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of Humanitarian OpenStreetMap Team'}}}},OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © OpenSeaMap contributors'}},OpenTopoMap:{url:"//{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: {attribution.OpenStreetMap}, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'}},Thunderforest:{url:"//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}",options:{attribution:'© Thunderforest, {attribution.OpenStreetMap}',variant:"cycle",apikey:"",maxZoom:22},variants:{OpenCycleMap:"cycle",Transport:{options:{variant:"transport"}},TransportDark:{options:{variant:"transport-dark"}},SpinalMap:{options:{variant:"spinal-map"}},Landscape:"landscape",Outdoors:"outdoors",Pioneer:"pioneer"}},OpenMapSurfer:{url:"http://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}",options:{maxZoom:20,variant:"roads",attribution:'Imagery from GIScience Research Group @ University of Heidelberg — Map data {attribution.OpenStreetMap}'},variants:{Roads:"roads",AdminBounds:{options:{variant:"adminb",maxZoom:19}},Grayscale:{options:{variant:"roadsg",maxZoom:19}}}},Hydda:{url:"//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png",options:{maxZoom:18,variant:"full",attribution:'Tiles courtesy of OpenStreetMap Sweden — Map data {attribution.OpenStreetMap}'},variants:{Full:"full",Base:"base",RoadsAndLabels:"roads_and_labels"}},MapBox:{url:"//api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",options:{attribution:'Imagery from MapBox — Map data {attribution.OpenStreetMap}',subdomains:"abcd",id:"streets",accessToken:""}},Stamen:{url:"//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}",options:{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data {attribution.OpenStreetMap}',subdomains:"abcd",minZoom:0,maxZoom:20,variant:"toner",ext:"png"},variants:{Toner:"toner",TonerBackground:"toner-background",TonerHybrid:"toner-hybrid",TonerLines:"toner-lines",TonerLabels:"toner-labels",TonerLite:"toner-lite",Watercolor:{options:{variant:"watercolor",minZoom:1,maxZoom:16}},Terrain:{options:{variant:"terrain",minZoom:0,maxZoom:18}},TerrainBackground:{options:{variant:"terrain-background",minZoom:0,maxZoom:18}},TopOSMRelief:{options:{variant:"toposm-color-relief",ext:"jpg",bounds:[[22,-132],[51,-56]]}},TopOSMFeatures:{options:{variant:"toposm-features",bounds:[[22,-132],[51,-56]],opacity:.9}}}},Esri:{url:"//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}",options:{variant:"World_Street_Map",attribution:"Tiles © Esri"},variants:{WorldStreetMap:{options:{attribution:"{attribution.Esri} — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}},DeLorme:{options:{variant:"Specialty/DeLorme_World_Base_Map",minZoom:1,maxZoom:11,attribution:"{attribution.Esri} — Copyright: ©2012 DeLorme"}},WorldTopoMap:{options:{variant:"World_Topo_Map",attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"}},WorldImagery:{options:{variant:"World_Imagery",attribution:"{attribution.Esri} — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}},WorldTerrain:{options:{variant:"World_Terrain_Base",maxZoom:13,attribution:"{attribution.Esri} — Source: USGS, Esri, TANA, DeLorme, and NPS"}},WorldShadedRelief:{options:{variant:"World_Shaded_Relief",maxZoom:13,attribution:"{attribution.Esri} — Source: Esri"}},WorldPhysical:{options:{variant:"World_Physical_Map",maxZoom:8,attribution:"{attribution.Esri} — Source: US National Park Service"}},OceanBasemap:{options:{variant:"Ocean_Basemap",maxZoom:13,attribution:"{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri"}},NatGeoWorldMap:{options:{variant:"NatGeo_World_Map",maxZoom:16,attribution:"{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC"}},WorldGrayCanvas:{options:{variant:"Canvas/World_Light_Gray_Base",maxZoom:16,attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ"}}}},OpenWeatherMap:{url:"http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'Map data © OpenWeatherMap',opacity:.5},variants:{Clouds:"clouds",CloudsClassic:"clouds_cls",Precipitation:"precipitation",PrecipitationClassic:"precipitation_cls",Rain:"rain",RainClassic:"rain_cls",Pressure:"pressure",PressureContour:"pressure_cntr",Wind:"wind",Temperature:"temp",Snow:"snow"}},HERE:{url:"//{s}.{base}.maps.cit.api.here.com/maptile/2.1/{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?app_id={app_id}&app_code={app_code}&lg={language}",options:{attribution:'Map © 1987-2014 HERE',subdomains:"1234",mapID:"newest",app_id:"",app_code:"",base:"base",variant:"normal.day",maxZoom:20,type:"maptile",language:"eng",format:"png8",size:"256"},variants:{normalDay:"normal.day",normalDayCustom:"normal.day.custom",normalDayGrey:"normal.day.grey",normalDayMobile:"normal.day.mobile",normalDayGreyMobile:"normal.day.grey.mobile",normalDayTransit:"normal.day.transit",normalDayTransitMobile:"normal.day.transit.mobile",normalNight:"normal.night",normalNightMobile:"normal.night.mobile",normalNightGrey:"normal.night.grey",normalNightGreyMobile:"normal.night.grey.mobile",basicMap:{options:{type:"basetile"}},mapLabels:{options:{type:"labeltile",format:"png"}},trafficFlow:{options:{base:"traffic",type:"flowtile"}},carnavDayGrey:"carnav.day.grey",hybridDay:{options:{base:"aerial",variant:"hybrid.day"}},hybridDayMobile:{options:{base:"aerial",variant:"hybrid.day.mobile"}},pedestrianDay:"pedestrian.day",pedestrianNight:"pedestrian.night",satelliteDay:{options:{base:"aerial",variant:"satellite.day"}},terrainDay:{options:{base:"aerial",variant:"terrain.day"}},terrainDayMobile:{options:{base:"aerial",variant:"terrain.day.mobile"}}}},FreeMapSK:{url:"http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg",options:{minZoom:8,maxZoom:16,subdomains:"1234",bounds:[[47.204642,15.996093],[49.830896,22.576904]],attribution:'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 Freemap.sk'}},MtbMap:{url:"http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png",options:{attribution:"{attribution.OpenStreetMap} & USGS"}},CartoDB:{url:"http://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap} © CartoDB',subdomains:"abcd",maxZoom:19,variant:"light_all"},variants:{Positron:"light_all",PositronNoLabels:"light_nolabels",PositronOnlyLabels:"light_only_labels",DarkMatter:"dark_all",DarkMatterNoLabels:"dark_nolabels",DarkMatterOnlyLabels:"dark_only_labels"}},HikeBike:{url:"http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:"{attribution.OpenStreetMap}",variant:"hikebike"},variants:{HikeBike:{},HillShading:{options:{maxZoom:15,variant:"hillshading"}}}},BasemapAT:{url:"https://maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}",options:{maxZoom:19,attribution:'Datenquelle: basemap.at',subdomains:["","1","2","3","4"],format:"png",bounds:[[46.35877,8.782379],[49.037872,17.189532]],variant:"geolandbasemap"},variants:{basemap:{options:{maxZoom:20,variant:"geolandbasemap"}},grau:"bmapgrau",overlay:"bmapoverlay",highdpi:{options:{variant:"bmaphidpi",format:"jpeg"}},orthofoto:{options:{maxZoom:20,variant:"bmaporthofoto30cm",format:"jpeg"}}}},NASAGIBS:{url:"//map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}",options:{attribution:'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.',bounds:[[-85.0511287776,-179.999999975],[85.0511287776,179.999999975]],minZoom:1,maxZoom:9,format:"jpg",time:"",tilematrixset:"GoogleMapsCompatible_Level"},variants:{ModisTerraTrueColorCR:"MODIS_Terra_CorrectedReflectance_TrueColor",ModisTerraBands367CR:"MODIS_Terra_CorrectedReflectance_Bands367",ViirsEarthAtNight2012:{options:{variant:"VIIRS_CityLights_2012",maxZoom:8}},ModisTerraLSTDay:{options:{variant:"MODIS_Terra_Land_Surface_Temp_Day",format:"png",maxZoom:7,opacity:.75}},ModisTerraSnowCover:{options:{variant:"MODIS_Terra_Snow_Cover",format:"png",maxZoom:8,opacity:.75}},ModisTerraAOD:{options:{variant:"MODIS_Terra_Aerosol",format:"png",maxZoom:6,opacity:.75}},ModisTerraChlorophyll:{options:{variant:"MODIS_Terra_Chlorophyll_A",format:"png",maxZoom:7,opacity:.75}}}},NLS:{url:"//nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg",options:{attribution:'National Library of Scotland Historic Maps',bounds:[[49.6,-12],[61.7,3]],minZoom:1,maxZoom:18,subdomains:"0123"}},JusticeMap:{url:"http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png",options:{attribution:'Justice Map',size:"county",bounds:[[14,-180],[72,-56]]},variants:{income:"income",americanIndian:"indian",asian:"asian",black:"black",hispanic:"hispanic",multi:"multi",nonWhite:"nonwhite",white:"white",plurality:"plural"}}},a.tileLayer.provider=function(t,o){return new a.TileLayer.Provider(t,o)},a}); \ No newline at end of file +!function(a,t){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof modules&&module.exports?module.exports=t(require("leaflet")):t(L)}(0,function(a){"use strict";return a.TileLayer.Provider=a.TileLayer.extend({initialize:function(t,o){var r=a.TileLayer.Provider.providers,e=t.split("."),i=e[0],n=e[1];if(!r[i])throw"No such provider ("+i+")";var s={url:r[i].url,options:r[i].options};if(n&&"variants"in r[i]){if(!(n in r[i].variants))throw"No such variant of "+i+" ("+n+")";var p,m=r[i].variants[n];p="string"==typeof m?{variant:m}:m.options,s={url:m.url||s.url,options:a.Util.extend({},s.options,p)}}var l="file:"===window.location.protocol||s.options.forceHTTP;0===s.url.indexOf("//")&&l&&(s.url="http:"+s.url),s.options.retina&&(o.detectRetina&&a.Browser.retina?o.detectRetina=!1:s.options.retina="");var d=function(a){return-1===a.indexOf("{attribution.")?a:a.replace(/\{attribution.(\w*)\}/,function(a,t){return d(r[t].options.attribution)})};s.options.attribution=d(s.options.attribution);var u=a.Util.extend({},s.options,o);a.TileLayer.prototype.initialize.call(this,s.url,u)}}),a.TileLayer.Provider.providers={OpenStreetMap:{url:"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'© OpenStreetMap'},variants:{Mapnik:{},BlackAndWhite:{url:"http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png",options:{maxZoom:18}},DE:{url:"//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",options:{maxZoom:18}},France:{url:"//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",options:{maxZoom:20,attribution:"© Openstreetmap France | {attribution.OpenStreetMap}"}},HOT:{url:"//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of Humanitarian OpenStreetMap Team'}}}},OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © OpenSeaMap contributors'}},OpenTopoMap:{url:"//{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: {attribution.OpenStreetMap}, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'}},Thunderforest:{url:"//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}",options:{attribution:'© Thunderforest, {attribution.OpenStreetMap}',variant:"cycle",apikey:"",maxZoom:22},variants:{OpenCycleMap:"cycle",Transport:{options:{variant:"transport"}},TransportDark:{options:{variant:"transport-dark"}},SpinalMap:{options:{variant:"spinal-map"}},Landscape:"landscape",Outdoors:"outdoors",Pioneer:"pioneer"}},OpenMapSurfer:{url:"http://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}",options:{maxZoom:20,variant:"roads",attribution:'Imagery from GIScience Research Group @ University of Heidelberg — Map data {attribution.OpenStreetMap}'},variants:{Roads:"roads",AdminBounds:{options:{variant:"adminb",maxZoom:19}},Grayscale:{options:{variant:"roadsg",maxZoom:19}}}},Hydda:{url:"//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png",options:{maxZoom:18,variant:"full",attribution:'Tiles courtesy of OpenStreetMap Sweden — Map data {attribution.OpenStreetMap}'},variants:{Full:"full",Base:"base",RoadsAndLabels:"roads_and_labels"}},MapBox:{url:"//api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",options:{attribution:'Imagery from MapBox — Map data {attribution.OpenStreetMap}',subdomains:"abcd",id:"streets",accessToken:""}},Stamen:{url:"//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}",options:{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data {attribution.OpenStreetMap}',subdomains:"abcd",minZoom:0,maxZoom:20,variant:"toner",ext:"png"},variants:{Toner:"toner",TonerBackground:"toner-background",TonerHybrid:"toner-hybrid",TonerLines:"toner-lines",TonerLabels:"toner-labels",TonerLite:"toner-lite",Watercolor:{options:{variant:"watercolor",minZoom:1,maxZoom:16}},Terrain:{options:{variant:"terrain",minZoom:0,maxZoom:18}},TerrainBackground:{options:{variant:"terrain-background",minZoom:0,maxZoom:18}},TopOSMRelief:{options:{variant:"toposm-color-relief",ext:"jpg",bounds:[[22,-132],[51,-56]]}},TopOSMFeatures:{options:{variant:"toposm-features",bounds:[[22,-132],[51,-56]],opacity:.9}}}},Esri:{url:"//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}",options:{variant:"World_Street_Map",attribution:"Tiles © Esri"},variants:{WorldStreetMap:{options:{attribution:"{attribution.Esri} — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}},DeLorme:{options:{variant:"Specialty/DeLorme_World_Base_Map",minZoom:1,maxZoom:11,attribution:"{attribution.Esri} — Copyright: ©2012 DeLorme"}},WorldTopoMap:{options:{variant:"World_Topo_Map",attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community"}},WorldImagery:{options:{variant:"World_Imagery",attribution:"{attribution.Esri} — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}},WorldTerrain:{options:{variant:"World_Terrain_Base",maxZoom:13,attribution:"{attribution.Esri} — Source: USGS, Esri, TANA, DeLorme, and NPS"}},WorldShadedRelief:{options:{variant:"World_Shaded_Relief",maxZoom:13,attribution:"{attribution.Esri} — Source: Esri"}},WorldPhysical:{options:{variant:"World_Physical_Map",maxZoom:8,attribution:"{attribution.Esri} — Source: US National Park Service"}},OceanBasemap:{options:{variant:"Ocean_Basemap",maxZoom:13,attribution:"{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri"}},NatGeoWorldMap:{options:{variant:"NatGeo_World_Map",maxZoom:16,attribution:"{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC"}},WorldGrayCanvas:{options:{variant:"Canvas/World_Light_Gray_Base",maxZoom:16,attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ"}}}},OpenWeatherMap:{url:"http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'Map data © OpenWeatherMap',opacity:.5},variants:{Clouds:"clouds",CloudsClassic:"clouds_cls",Precipitation:"precipitation",PrecipitationClassic:"precipitation_cls",Rain:"rain",RainClassic:"rain_cls",Pressure:"pressure",PressureContour:"pressure_cntr",Wind:"wind",Temperature:"temp",Snow:"snow"}},HERE:{url:"//{s}.{base}.maps.cit.api.here.com/maptile/2.1/{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?app_id={app_id}&app_code={app_code}&lg={language}",options:{attribution:'Map © 1987-2014 HERE',subdomains:"1234",mapID:"newest",app_id:"",app_code:"",base:"base",variant:"normal.day",maxZoom:20,type:"maptile",language:"eng",format:"png8",size:"256"},variants:{normalDay:"normal.day",normalDayCustom:"normal.day.custom",normalDayGrey:"normal.day.grey",normalDayMobile:"normal.day.mobile",normalDayGreyMobile:"normal.day.grey.mobile",normalDayTransit:"normal.day.transit",normalDayTransitMobile:"normal.day.transit.mobile",normalNight:"normal.night",normalNightMobile:"normal.night.mobile",normalNightGrey:"normal.night.grey",normalNightGreyMobile:"normal.night.grey.mobile",basicMap:{options:{type:"basetile"}},mapLabels:{options:{type:"labeltile",format:"png"}},trafficFlow:{options:{base:"traffic",type:"flowtile"}},carnavDayGrey:"carnav.day.grey",hybridDay:{options:{base:"aerial",variant:"hybrid.day"}},hybridDayMobile:{options:{base:"aerial",variant:"hybrid.day.mobile"}},pedestrianDay:"pedestrian.day",pedestrianNight:"pedestrian.night",satelliteDay:{options:{base:"aerial",variant:"satellite.day"}},terrainDay:{options:{base:"aerial",variant:"terrain.day"}},terrainDayMobile:{options:{base:"aerial",variant:"terrain.day.mobile"}}}},FreeMapSK:{url:"http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg",options:{minZoom:8,maxZoom:16,subdomains:"1234",bounds:[[47.204642,15.996093],[49.830896,22.576904]],attribution:'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 Freemap.sk'}},MtbMap:{url:"http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png",options:{attribution:"{attribution.OpenStreetMap} & USGS"}},CartoDB:{url:"http://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap} © CartoDB',subdomains:"abcd",maxZoom:19,variant:"light_all"},variants:{Positron:"light_all",PositronNoLabels:"light_nolabels",PositronOnlyLabels:"light_only_labels",DarkMatter:"dark_all",DarkMatterNoLabels:"dark_nolabels",DarkMatterOnlyLabels:"dark_only_labels"}},HikeBike:{url:"http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:"{attribution.OpenStreetMap}",variant:"hikebike"},variants:{HikeBike:{},HillShading:{options:{maxZoom:15,variant:"hillshading"}}}},BasemapAT:{url:"https://maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}",options:{maxZoom:19,attribution:'Datenquelle: basemap.at',subdomains:["","1","2","3","4"],format:"png",bounds:[[46.35877,8.782379],[49.037872,17.189532]],variant:"geolandbasemap"},variants:{basemap:{options:{maxZoom:20,variant:"geolandbasemap"}},grau:"bmapgrau",overlay:"bmapoverlay",highdpi:{options:{variant:"bmaphidpi",format:"jpeg"}},orthofoto:{options:{maxZoom:20,variant:"bmaporthofoto30cm",format:"jpeg"}}}},NASAGIBS:{url:"//map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}",options:{attribution:'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.',bounds:[[-85.0511287776,-179.999999975],[85.0511287776,179.999999975]],minZoom:1,maxZoom:9,format:"jpg",time:"",tilematrixset:"GoogleMapsCompatible_Level"},variants:{ModisTerraTrueColorCR:"MODIS_Terra_CorrectedReflectance_TrueColor",ModisTerraBands367CR:"MODIS_Terra_CorrectedReflectance_Bands367",ViirsEarthAtNight2012:{options:{variant:"VIIRS_CityLights_2012",maxZoom:8}},ModisTerraLSTDay:{options:{variant:"MODIS_Terra_Land_Surface_Temp_Day",format:"png",maxZoom:7,opacity:.75}},ModisTerraSnowCover:{options:{variant:"MODIS_Terra_Snow_Cover",format:"png",maxZoom:8,opacity:.75}},ModisTerraAOD:{options:{variant:"MODIS_Terra_Aerosol",format:"png",maxZoom:6,opacity:.75}},ModisTerraChlorophyll:{options:{variant:"MODIS_Terra_Chlorophyll_A",format:"png",maxZoom:7,opacity:.75}}}},NLS:{url:"//nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg",options:{attribution:'National Library of Scotland Historic Maps',bounds:[[49.6,-12],[61.7,3]],minZoom:1,maxZoom:18,subdomains:"0123"}},JusticeMap:{url:"http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png",options:{attribution:'Justice Map',size:"county",bounds:[[14,-180],[72,-56]]},variants:{income:"income",americanIndian:"indian",asian:"asian",black:"black",hispanic:"hispanic",multi:"multi",nonWhite:"nonwhite",white:"white",plurality:"plural"}}},a.tileLayer.provider=function(t,o){return new a.TileLayer.Provider(t,o)},a}); \ No newline at end of file diff --git a/module/config/config.php b/module/config/config.php index 3681ed8..55f0e1d 100644 --- a/module/config/config.php +++ b/module/config/config.php @@ -75,7 +75,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-fullscreen'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocoder'] = array ( 'name' => 'Leaflet Control Geocoder', - 'version' => '1.5.4', + 'version' => '1.5.5', 'license' => 'BSD-2-Clause', 'homepage' => 'https://github.com/perliedman/leaflet-control-geocoder', 'css' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.min.css',