forked from Snck3rs/contao-leaflet-libraries
Update control geocoder to v1.5.5.
This commit is contained in:
1 parent
a2cdfddcc6
commit
ed594cfdd1
9 files changed
+34
-23
No files matched your search
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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;r<n.length;r++)s(n[r]);return s}({1:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:"undefined"!=typeof o?o.L:null,s=e("./geocoders/nominatim").class;t.exports={class:n.Control.extend({options:{showResultIcons:!1,collapsed:!0,expand:"click",position:"topright",placeholder:"Search...",errorMessage:"Nothing found.",suggestMinLength:3,suggestTimeout:250,defaultMarkGeocode:!0},includes:n.Mixin.Events,initialize:function(e){n.Util.setOptions(this,e),this.options.geocoder||(this.options.geocoder=new s),this._requestCount=0},onAdd:function(e){var t,o="leaflet-control-geocoder",s=n.DomUtil.create("div",o+" leaflet-bar"),i=n.DomUtil.create("button",o+"-icon",s),r=this._form=n.DomUtil.create("div",o+"-form",s);return this._map=e,this._container=s,i.innerHTML=" ",i.type="button",t=this._input=n.DomUtil.create("input","",r),t.type="text",t.placeholder=this.options.placeholder,this._errorElement=n.DomUtil.create("div",o+"-form-no-error",s),this._errorElement.innerHTML=this.options.errorMessage,this._alts=n.DomUtil.create("ul",o+"-alternatives leaflet-control-geocoder-alternatives-minimized",s),n.DomEvent.disableClickPropagation(this._alts),n.DomEvent.addListener(t,"keydown",this._keydown,this),n.DomEvent.addListener(t,"blur",function(){this.options.collapsed&&!this._preventBlurCollapse&&this._collapse(),this._preventBlurCollapse=!1},this),this.options.collapsed?"click"===this.options.expand?n.DomEvent.addListener(i,"click",function(e){0===e.button&&2!==e.detail&&this._toggle()},this):(n.DomEvent.addListener(i,"mouseover",this._expand,this),n.DomEvent.addListener(i,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(n.DomEvent.addListener(i,"click",function(e){this._geocode(e)},this),this._expand()),this.options.defaultMarkGeocode&&this.on("markgeocode",this.markGeocode,this),this.on("startgeocode",function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")},this),this.on("finishgeocode",function(){n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")},this),n.DomEvent.disableClickPropagation(s),s},_geocodeResult:function(e,t){if(t||1!==e.length)if(e.length>0){this._alts.innerHTML="",this._results=e,n.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized");for(var o=0;o<e.length;o++)this._alts.appendChild(this._createAlt(e[o],o))}else n.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error");else this._geocodeResultSelected(e[0])},markGeocode:function(e){return e=e.geocode||e,this._map.fitBounds(e.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new n.Marker(e.center).bindPopup(e.html||e.name).addTo(this._map).openPopup(),this},_geocode:function(e){var t=++this._requestCount,o=e?"suggest":"geocode";this._lastGeocode=this._input.value,e||this._clearResults(),this.fire("start"+o),this.options.geocoder[o](this._input.value,function(n){t===this._requestCount&&(this.fire("finish"+o),this._geocodeResult(n,e))},this)},_geocodeResultSelected:function(e){this.options.collapsed||this._clearResults(),this.fire("markgeocode",{geocode:e})},_toggle:function(){this._container.className.indexOf("leaflet-control-geocoder-expanded")>=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._collapLine truncated
|
||||
!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;r<n.length;r++)s(n[r]);return s}({1:[function(e,t,o){(function(o){var n="undefined"!=typeof window?window.L:void 0!==o?o.L:null,s=e("./geocoders/nominatim").class;t.exports={class:n.Control.extend({options:{showResultIcons:!1,collapsed:!0,expand:"click",position:"topright",placeholder:"Search...",errorMessage:"Nothing found.",suggestMinLength:3,suggestTimeout:250,defaultMarkGeocode:!0},includes:n.Mixin.Events,initialize:function(e){n.Util.setOptions(this,e),this.options.geocoder||(this.options.geocoder=new s),this._requestCount=0},onAdd:function(e){var t,o="leaflet-control-geocoder",s=n.DomUtil.create("div",o+" leaflet-bar"),i=n.DomUtil.create("button",o+"-icon",s),r=this._form=n.DomUtil.create("div",o+"-form",s);return this._map=e,this._container=s,i.innerHTML=" ",i.type="button",t=this._input=n.DomUtil.create("input","",r),t.type="text",t.placeholder=this.options.placeholder,this._errorElement=n.DomUtil.create("div",o+"-form-no-error",s),this._errorElement.innerHTML=this.options.errorMessage,this._alts=n.DomUtil.create("ul",o+"-alternatives leaflet-control-geocoder-alternatives-minimized",s),n.DomEvent.disableClickPropagation(this._alts),n.DomEvent.addListener(t,"keydown",this._keydown,this),n.DomEvent.addListener(t,"blur",function(){this.options.collapsed&&!this._preventBlurCollapse&&this._collapse(),this._preventBlurCollapse=!1},this),this.options.collapsed?"click"===this.options.expand?n.DomEvent.addListener(i,"click",function(e){0===e.button&&2!==e.detail&&this._toggle()},this):(n.DomEvent.addListener(i,"mouseover",this._expand,this),n.DomEvent.addListener(i,"mouseout",this._collapse,this),this._map.on("movestart",this._collapse,this)):(n.DomEvent.addListener(i,"click",function(e){this._geocode(e)},this),this._expand()),this.options.defaultMarkGeocode&&this.on("markgeocode",this.markGeocode,this),this.on("startgeocode",function(){n.DomUtil.addClass(this._container,"leaflet-control-geocoder-throbber")},this),this.on("finishgeocode",function(){n.DomUtil.removeClass(this._container,"leaflet-control-geocoder-throbber")},this),n.DomEvent.disableClickPropagation(s),s},_geocodeResult:function(e,t){if(t||1!==e.length)if(e.length>0){this._alts.innerHTML="",this._results=e,n.DomUtil.removeClass(this._alts,"leaflet-control-geocoder-alternatives-minimized");for(var o=0;o<e.length;o++)this._alts.appendChild(this._createAlt(e[o],o))}else n.DomUtil.addClass(this._errorElement,"leaflet-control-geocoder-error");else this._geocodeResultSelected(e[0])},markGeocode:function(e){return e=e.geocode||e,this._map.fitBounds(e.bbox),this._geocodeMarker&&this._map.removeLayer(this._geocodeMarker),this._geocodeMarker=new n.Marker(e.center).bindPopup(e.html||e.name).addTo(this._map).openPopup(),this},_geocode:function(e){var t=++this._requestCount,o=e?"suggest":"geocode",n={input:this._input.value};this._lastGeocode=this._input.value,e||this._clearResults(),this.fire("start"+o,n),this.options.geocoder[o](this._input.value,function(s){t===this._requestCount&&(n.results=s,this.fire("finish"+o,n),this._geocodeResult(s,e))},this)},_geocodeResultSelected:function(e){this.options.collapsed||this._clearResults(),this.fire("markgeocode",{geocode:e})},_toggle:function(){this._container.className.indexOf("leaflet-control-geocoder-expanded")>=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(){thisLine truncated
|
||||
@@ -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 |
|
||||
@@ -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 <per@liedman.net>"
|
||||
],
|
||||
"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"
|
||||
],
|
||||
|
||||
@@ -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": {
|
||||
|
||||
+1
-1
@@ -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;t<l;t++)if(e.prefix=n[t],"undefined"!=typeof document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}"undefined"!=typeof document.msExitFullscreen&&(e.prefix="ms",e.supportsFullScreen=!0)}e.supportsFullScreen&&("ms"===e.prefix?e.fullScreenEventName="MSFullscreenChange":e.fullScreenEventName=e.prefix+"fullscreenchange",e.isFullScreen=function(){switch(this.prefix){case"":return document.fullscreen;case"webkit":return document.webkitIsFullScreen;case"ms":return document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},e.requestFullScreen=function(e){switch(this.prefix){case"":return e.requestFullscreen();case"ms":return e.msRequestFullscreen();default:return e[this.prefix+"RequestFullScreen"]()}},e.cancelFullScreen=function(){switch(this.prefix){case"":return document.exitFullscreen();case"ms":return document.msExitFullscreen();default:return document[this.prefix+"CancelFullScreen"]()}}),"undefined"!=typeof jQuery&&(jQuery.fn.requestFullScreen=function(){return this.each(function(){var n=jQuery(this);e.supportsFullScreen&&e.requestFullScreen(n)})}),window.fullScreenApi=e}();
|
||||
!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 t,n="leaflet-control-zoom-fullscreen",l="";return t=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:n+=" fullscreen-icon",this._createButton(this.options.title,n,l,t,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),t},_createButton:function(t,n,l,r,i,s){return this.link=L.DomUtil.create("a",n,r),this.link.href="#",this.link.title=t,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 t=this._map;t._exitFired=!1,t._isFullscreen?(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.cancelFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:t._container):L.DomUtil.removeClass(t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize(),t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1):(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:t._container):L.DomUtil.addClass(t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize(),t.fire("enterFullscreen"),t._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleEscKey:function(){var t=this._map;e.isFullScreen(t)||t._exitFired||(t.fire("exitFullscreen"),t._exitFired=!0,t._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:""},t="webkit moz o ms khtml".split(" ");if(void 0!==document.exitFullscreen)e.supportsFullScreen=!0;else{for(var n=0,l=t.length;n<l;n++)if(e.prefix=t[n],void 0!==document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}void 0!==document.msExitFullscreen&&(e.prefix="ms",e.supportsFullScreen=!0)}e.supportsFullScreen&&("ms"===e.prefix?e.fullScreenEventName="MSFullscreenChange":e.fullScreenEventName=e.prefix+"fullscreenchange",e.isFullScreen=function(){switch(this.prefix){case"":return document.fullscreen;case"webkit":return document.webkitIsFullScreen;case"ms":return document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},e.requestFullScreen=function(e){switch(this.prefix){case"":return e.requestFullscreen();case"ms":return e.msRequestFullscreen();default:return e[this.prefix+"RequestFullScreen"]()}},e.cancelFullScreen=function(){switch(this.prefix){case"":return document.exitFullscreen();case"ms":return document.msExitFullscreen();default:return document[this.prefix+"CancelFullScreen"]()}}),"undefined"!=typeof jQuery&&(jQuery.fn.requestFullScreen=function(){return this.each(function(){var t=jQuery(this);e.supportsFullScreen&&e.requestFullScreen(t)})}),window.fullScreenApi=e}();
|
||||
+1
-1
@@ -1 +1 @@
|
||||
!function(a,t){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof modules&&module.exports?module.exports=t(require("leaflet")):t(L)}(this,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 a.indexOf("{attribution.")===-1?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:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'},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 <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'}}}},OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}},OpenTopoMap:{url:"//{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'}},Thunderforest:{url:"//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}",options:{attribution:'© <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',variant:"cycle",apikey:"<insert your api key here>",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 <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — 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 <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — 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 <a href="http://mapbox.com/about/maps/">MapBox</a> — Map data {attribution.OpenStreetMap}',subdomains:"abcd",id:"streets",accessToken:"<insert your access token here>"}},Stamen:{url:"//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}",options:{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — 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",attrLine truncated
|
||||
!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:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'},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 <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'}}}},OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}},OpenTopoMap:{url:"//{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'}},Thunderforest:{url:"//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}",options:{attribution:'© <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',variant:"cycle",apikey:"<insert your api key here>",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 <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — 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 <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — 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 <a href="http://mapbox.com/about/maps/">MapBox</a> — Map data {attribution.OpenStreetMap}',subdomains:"abcd",id:"streets",accessToken:"<insert your access token here>"}},Stamen:{url:"//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}",options:{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — 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",attributLine truncated
|
||||
@@ -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' => '<a href="https://github.com/perliedman/leaflet-control-geocoder/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
|
||||
'homepage' => 'https://github.com/perliedman/leaflet-control-geocoder',
|
||||
'css' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.min.css',
|
||||
|
||||
Reference in new issue
Block a user