From b30897f1da240c84fcbccc19fa6be77e43b0ed41 Mon Sep 17 00:00:00 2001 From: Viglino Date: Mon, 7 May 2018 12:06:18 +0200 Subject: [PATCH] [DOC] --- dist/ol-ext.js | 172 +------ dist/ol-ext.min.js | 2 +- doc/doc-pages/classes.list.html | 12 +- doc/doc-pages/index.html | 18 +- doc/doc-pages/namespaces.list.html | 12 +- doc/doc-pages/ol.HexGrid.html | 8 +- doc/doc-pages/ol.Map.html | 6 +- doc/doc-pages/ol.Overlay.Magnify.html | 8 +- doc/doc-pages/ol.Overlay.Popup.html | 8 +- doc/doc-pages/ol.Overlay.html | 6 +- doc/doc-pages/ol.control.Bar.html | 10 +- doc/doc-pages/ol.control.Button.html | 8 +- .../ol.control.CanvasAttribution.html | 8 +- doc/doc-pages/ol.control.CanvasScaleLine.html | 8 +- doc/doc-pages/ol.control.CanvasTitle.html | 8 +- doc/doc-pages/ol.control.Cloud.html | 8 +- doc/doc-pages/ol.control.Compass.html | 10 +- doc/doc-pages/ol.control.Control.html | 6 +- doc/doc-pages/ol.control.Disable.html | 8 +- doc/doc-pages/ol.control.Gauge.html | 8 +- doc/doc-pages/ol.control.GeoBookmark.html | 8 +- doc/doc-pages/ol.control.Globe.html | 8 +- doc/doc-pages/ol.control.Graticule.html | 8 +- doc/doc-pages/ol.control.GridReference.html | 10 +- doc/doc-pages/ol.control.LayerPopup.html | 171 ++++++- doc/doc-pages/ol.control.LayerSwitcher.html | 401 +++++++++++++++- .../ol.control.LayerSwitcherImage.html | 171 ++++++- doc/doc-pages/ol.control.Overlay.html | 8 +- doc/doc-pages/ol.control.Overview.html | 8 +- doc/doc-pages/ol.control.Permalink.html | 8 +- doc/doc-pages/ol.control.Profil.html | 8 +- doc/doc-pages/ol.control.Search.html | 182 +++++++- doc/doc-pages/ol.control.SearchBAN.html | 191 +++++++- doc/doc-pages/ol.control.SearchFeature.html | 218 ++++++++- doc/doc-pages/ol.control.SearchPhoton.html | 48 +- doc/doc-pages/ol.control.Swipe.html | 8 +- doc/doc-pages/ol.control.Target.html | 10 +- doc/doc-pages/ol.control.TextButton.html | 8 +- doc/doc-pages/ol.control.Toggle.html | 8 +- doc/doc-pages/ol.control.html | 6 +- doc/doc-pages/ol.easing.html | 6 +- doc/doc-pages/ol.featureAnimation.Bounce.html | 8 +- doc/doc-pages/ol.featureAnimation.Drop.html | 8 +- doc/doc-pages/ol.featureAnimation.Fade.html | 8 +- doc/doc-pages/ol.featureAnimation.None.html | 8 +- doc/doc-pages/ol.featureAnimation.Null.html | 8 +- doc/doc-pages/ol.featureAnimation.Path.html | 37 +- doc/doc-pages/ol.featureAnimation.Shake.html | 8 +- doc/doc-pages/ol.featureAnimation.Show.html | 8 +- doc/doc-pages/ol.featureAnimation.Slide.html | 8 +- .../ol.featureAnimation.Teleport.html | 8 +- doc/doc-pages/ol.featureAnimation.Throw.html | 8 +- doc/doc-pages/ol.featureAnimation.Zoom.html | 8 +- .../ol.featureAnimation.ZoomOut.html | 8 +- doc/doc-pages/ol.featureAnimation.html | 8 +- doc/doc-pages/ol.filter.Base.html | 8 +- doc/doc-pages/ol.filter.Clip.html | 10 +- doc/doc-pages/ol.filter.Colorize.html | 8 +- doc/doc-pages/ol.filter.Composite.html | 8 +- doc/doc-pages/ol.filter.Crop.html | 10 +- doc/doc-pages/ol.filter.Fold.html | 8 +- doc/doc-pages/ol.filter.Lego.html | 8 +- doc/doc-pages/ol.filter.Mask.html | 8 +- doc/doc-pages/ol.filter.Texture.html | 10 +- doc/doc-pages/ol.filter.html | 6 +- doc/doc-pages/ol.html | 6 +- doc/doc-pages/ol.interaction.CenterTouch.html | 10 +- doc/doc-pages/ol.interaction.Clip.html | 8 +- doc/doc-pages/ol.interaction.DrawHole.html | 8 +- doc/doc-pages/ol.interaction.DrawRegular.html | 8 +- doc/doc-pages/ol.interaction.DrawTouch.html | 10 +- doc/doc-pages/ol.interaction.DropFile.html | 8 +- doc/doc-pages/ol.interaction.Flashlight.html | 8 +- .../ol.interaction.GeolocationDraw.html | 8 +- doc/doc-pages/ol.interaction.Hover.html | 8 +- doc/doc-pages/ol.interaction.LongTouch.html | 8 +- doc/doc-pages/ol.interaction.Ripple.html | 8 +- .../ol.interaction.SelectCluster.html | 8 +- doc/doc-pages/ol.interaction.SnapGuides.html | 8 +- doc/doc-pages/ol.interaction.Split.html | 8 +- doc/doc-pages/ol.interaction.Splitter.html | 8 +- doc/doc-pages/ol.interaction.Synchronize.html | 10 +- doc/doc-pages/ol.interaction.TinkerBell.html | 8 +- .../ol.interaction.TouchCompass.html | 8 +- doc/doc-pages/ol.interaction.Transform.html | 12 +- doc/doc-pages/ol.interaction.html | 9 +- doc/doc-pages/ol.layer.AnimatedCluster.html | 8 +- doc/doc-pages/ol.layer.Base.html | 6 +- doc/doc-pages/ol.layer.Vector.html | 6 +- doc/doc-pages/ol.ordering.html | 6 +- doc/doc-pages/ol.render3D.html | 8 +- doc/doc-pages/ol.source.DBPedia.html | 8 +- doc/doc-pages/ol.source.GeoImage.html | 10 +- doc/doc-pages/ol.source.HexBin.html | 225 ++++++++- doc/doc-pages/ol.source.Mapillary.html | 8 +- doc/doc-pages/ol.source.WikiCommons.html | 8 +- doc/doc-pages/ol.source.html | 6 +- doc/doc-pages/ol.style.Chart.html | 8 +- doc/doc-pages/ol.style.FillPattern.html | 8 +- doc/doc-pages/ol.style.FontSymbol.html | 8 +- doc/doc-pages/ol.style.Photo.html | 8 +- doc/doc-pages/ol.style.Shadow.html | 159 ++++++- doc/doc-pages/ol.style.TextPath.html | 8 +- doc/doc-pages/ol.style.html | 9 +- doc/doc-pages/quicksearch.html | 2 +- doc/doc.md | 14 +- doc/jsdoc.json | 2 +- .../map.interaction.geolocationdraw.html | 2 +- examples/style/map.style.font.html | 2 +- package-lock.json | 438 ++++++++++++++++-- package.json | 1 + src/geom/GeomUtils.js | 4 +- src/interaction/Offset.js | 5 +- 113 files changed, 2547 insertions(+), 660 deletions(-) diff --git a/dist/ol-ext.js b/dist/ol-ext.js index 775873fc..cb41fa0c 100644 --- a/dist/ol-ext.js +++ b/dist/ol-ext.js @@ -7748,7 +7748,9 @@ ol.inherits(ol.interaction.LongTouch, ol.interaction.Interaction); /** Offset interaction for offseting feature geometry * @constructor * @extends {ol.interaction.Pointer} - * @fires + * @fires offsetstart + * @fires offsetting + * @fires offsetend * @param {any} options * @param {ol.layer.Vector | Array} options.layers list of feature to transform * @param {ol.Collection.} options.features collection of feature to transform @@ -7911,6 +7913,7 @@ ol.interaction.Offset.prototype.handleUpEvent_ = function(e) { }; /** * @param {ol.MapBrowserEvent} e Event. + * @private */ ol.interaction.Offset.prototype.handleMoveEvent_ = function(e) { var f = this.getFeatureAtPixel_(e); @@ -11564,172 +11567,9 @@ ol.geom.LineString.prototype.splitAt = function(pt, tol) else return [this]; } /** Offset a polyline - * @param {Array} coords * @param {Number} offset - * @return {Array} pt points to split the line -* @param {Number} tol distance tolerance for 2 points to be equal -*/ -ol.geom.LineString.prototype.splitAt = function(pt, tol) -{ if (!pt) return [this]; - if (!tol) tol = 1e-10; - // Test if list of points - if (pt.length && pt[0].length) - { var result = [this]; - for (var i=0; i1) c.push (new ol.geom.LineString(ci)); - if (c.length) return c; - else return [this]; -} -/** Offset a polyline - * @param {Array} resulting coord * @see http://stackoverflow.com/a/11970006/796832 * @see https://drive.google.com/viewerng/viewer?a=v&pid=sites&srcid=ZGVmYXVsdGRvbWFpbnxqa2dhZGdldHN0b3JlfGd4OjQ4MzI5M2Y0MjNmNzI2MjY */ diff --git a/dist/ol-ext.min.js b/dist/ol-ext.min.js index 3b3b0377..73d0c6b0 100644 --- a/dist/ol-ext.min.js +++ b/dist/ol-ext.min.js @@ -6,4 +6,4 @@ * @see https://github.com/Viglino/ol-ext#, * @license BSD-3-Clause */ -ol.control.Search=function(t){var e=this;t||(t={}),void 0==t.typing&&(t.typing=300);var o=document.createElement("DIV"),i=(t.className||"")+" ol-search";t.target||(i+=" ol-unselectable ol-control ol-collapsed",this.button=document.createElement("BUTTON"),this.button.setAttribute("type","button"),this.button.setAttribute("title",t.label||"search"),this.button.addEventListener("click",function(){if(o.classList.toggle("ol-collapsed"),!o.classList.contains("ol-collapsed")){o.querySelector("input.search").focus();for(var t=o.querySelectorAll("li"),e=0;e=0)(s=l)?(r&&clearTimeout(r),r=setTimeout(function(){if(s.length>=e.get("minLength")){var t=e.autocomplete(s,function(t){e.drawList_(t)});t&&e.drawList_(t)}else e.drawList_()},t.typing)):e.drawList_();else{(n=o.querySelector("ul.autocomplete li"))&&n.classList.remove("select")}else o.classList.contains("ol-control")&&a.blur(),n.classList.remove("select"),s=l,e.select(e._list[n.getAttribute("data-search")]);else e.drawList_()};a.addEventListener("keyup",n),a.addEventListener("search",n),a.addEventListener("cut",n),a.addEventListener("paste",n),a.addEventListener("input",n),a.addEventListener("blur",function(){setTimeout(function(){o.classList.add("ol-collapsed")},200)}),a.addEventListener("focus",function(){o.classList.remove("ol-collapsed")}),o.appendChild(a);var l=document.createElement("UL");l.classList.add("autocomplete"),o.appendChild(l),ol.control.Control.call(this,{element:o,target:t.target}),"function"==typeof t.getTitle&&(this.getTitle=t.getTitle),"function"==typeof t.autocomplete&&(this.autocomplete=t.autocomplete),this.set("minLength",t.minLength||1),this.set("maxItems",t.maxItems||10)},ol.inherits(ol.control.Search,ol.control.Control),ol.control.Search.prototype.getTitle=function(t){return t.name||"No title"},ol.control.Search.prototype.search=function(){var t=this.element.querySelector("input.search");this._triggerCustomEvent("search",t)},ol.control.Search.prototype._triggerCustomEvent=function(t,e){var o;window.CustomEvent?o=new CustomEvent(t):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{}),e.dispatchEvent(o)},ol.control.Search.prototype.setInput=function(t,e){var o=this.element.querySelector("input.search");o.value=t,e&&this._triggerCustomEvent("keyup",o)},ol.control.Search.prototype.select=function(t){this.dispatchEvent({type:"select",search:t})},ol.control.Search.prototype.autocomplete=function(t,e){return e([]),!1},ol.control.Search.prototype.drawList_=function(t){var e=this.element.querySelector("ul.autocomplete");if(e.innerHTML="",t){var o=this,i=Math.min(o.get("maxItems"),t.length);this._list=[];for(var r=0;r=200&&this.status<400){var t=JSON.parse(this.response);e(i.handleResponse(t))}else console.log(r+s,arguments)},n.onerror=function(){i._request=null,i.element.classList.remove("searching"),console.log(r+s,arguments)},n.send()},ol.control.SearchJSON.prototype.requestData=function(t){return{q:t}},ol.control.SearchJSON.prototype.handleResponse=function(t){return t},ol.control.SearchPhoton=function(t){(t=t||{}).url=t.url||"http://photon.komoot.de/api/",ol.control.SearchJSON.call(this,t),this.set("lang",t.lang),this.set("position",t.position),this.set("copy","© OpenStreetMap contributors")},ol.inherits(ol.control.SearchPhoton,ol.control.SearchJSON),ol.control.SearchPhoton.prototype.getTitle=function(t){var e=t.properties;return(e.housenumber||"")+" "+(e.street||e.name||"")+" "+(e.postcode||"")+" "+(e.city||"")+" ("+e.country+")"},ol.control.SearchPhoton.prototype.requestData=function(t){var e={q:t,lang:this.get("lang"),limit:this.get("maxItems")};if(this.get("position")){var o=this.getMap().getView(),i=new ol.geom.Point(o.getCenter());i=i.transform(o.getProjection(),"EPSG:4326").getCoordinates(),e.lon=i[0],e.lat=i[1]}return e},ol.control.SearchPhoton.prototype.handleResponse=function(t,e){return t.features},ol.control.SearchPhoton.prototype.equalFeatures=function(t,e){return this.getTitle(t)===this.getTitle(e)&&t.geometry.coordinates[0]===e.geometry.coordinates[0]&&t.geometry.coordinates[1]===e.geometry.coordinates[1]},ol.control.SearchPhoton.prototype.select=function(t){var e=t.geometry.coordinates;try{e=ol.proj.transform(t.geometry.coordinates,"EPSG:4326",this.getMap().getView().getProjection())}catch(t){}this.dispatchEvent({type:"select",search:t,coordinate:e})},ol.control.LayerSwitcher=function(t){t=t||{};var e,o=this;this.dcount=0,this.show_progress=t.show_progress,this.oninfo="function"==typeof t.oninfo?t.oninfo:null,this.onextent="function"==typeof t.onextent?t.onextent:null,this.hasextent=t.extent||t.onextent,this.hastrash=t.trash,this.reordering=!1!==t.reordering,"function"==typeof t.displayInLayerSwitcher&&(this.displayInLayerSwitcher=t.displayInLayerSwitcher),t.target?e=$("
").addClass(t.switcherClass||"ol-layerswitcher"):(e=$("
").addClass((t.switcherClass||"ol-layerswitcher")+" ol-unselectable ol-control ol-collapsed"),this.button=$("