# HG changeset patch # User Thierry Florac # Date 1532083862 -7200 # Node ID 35c64c85e5f5a25650556866f1de65b541df1f5f # Parent 37970a21346362f21f240bd16c186e984a7a32c4 Version 0.1.10 diff -r 37970a213463 -r 35c64c85e5f5 .installed.cfg --- a/.installed.cfg Thu Jul 12 17:40:07 2018 +0200 +++ b/.installed.cfg Fri Jul 20 12:51:02 2018 +0200 @@ -110,3 +110,31 @@ [buildout] parts = package i18n pyflakes test + +[buildout] +installed_develop_eggs = /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-file.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/lingua.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-template.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-skin.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-pagelet.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-viewlet.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-i18n.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/tmpaj2y7mjobuild + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-gis.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-zmi.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/tmpet_dgqbkbuild + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-catalog.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-form.egg-link + /home/tflorac/Dropbox/src/PyAMS/pyams_gis/develop-eggs/pyams-utils.egg-link + +[buildout] +parts = i18n pyflakes test package + +[buildout] +parts = pyflakes test package i18n + +[buildout] +parts = test package i18n pyflakes + +[buildout] +parts = package i18n pyflakes test diff -r 37970a213463 -r 35c64c85e5f5 docs/HISTORY.txt --- a/docs/HISTORY.txt Thu Jul 12 17:40:07 2018 +0200 +++ b/docs/HISTORY.txt Fri Jul 20 12:51:02 2018 +0200 @@ -1,6 +1,11 @@ History ======= +0.1.10 +------ + - renamed TALES extension + - updated position and area selection widgets templates + 0.1.9 ----- - use relative URLs to get images diff -r 37970a213463 -r 35c64c85e5f5 src/pyams_gis.egg-info/PKG-INFO --- a/src/pyams_gis.egg-info/PKG-INFO Thu Jul 12 17:40:07 2018 +0200 +++ b/src/pyams_gis.egg-info/PKG-INFO Fri Jul 20 12:51:02 2018 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: pyams-gis -Version: 0.1.9 +Version: 0.1.10 Summary: PyAMS GIS helpers interfaces and classes Home-page: http://hg.ztfy.org/pyams/pyams_gis Author: Thierry Florac @@ -18,6 +18,11 @@ History ======= + 0.1.10 + ------ + - renamed TALES extension + - updated position and area selection widgets templates + 0.1.9 ----- - use relative URLs to get images diff -r 37970a213463 -r 35c64c85e5f5 src/pyams_gis.egg-info/SOURCES.txt --- a/src/pyams_gis.egg-info/SOURCES.txt Thu Jul 12 17:40:07 2018 +0200 +++ b/src/pyams_gis.egg-info/SOURCES.txt Fri Jul 20 12:51:02 2018 +0200 @@ -32,8 +32,6 @@ src/pyams_gis/locales/fr/LC_MESSAGES/pyams_gis.po src/pyams_gis/resources/css/leaflet-1.0.3.css src/pyams_gis/resources/css/leaflet-1.0.3.min.css -src/pyams_gis/resources/css/leaflet-1.0.3.min.min.css -src/pyams_gis/resources/css/leaflet-1.0.3.min.min.min.css src/pyams_gis/resources/css/leaflet-draw.css src/pyams_gis/resources/css/leaflet-draw.min.css src/pyams_gis/resources/css/leaflet-esri-geocoder.css @@ -119,12 +117,12 @@ src/pyams_gis/tests/__init__.py src/pyams_gis/tests/test_utilsdocs.py src/pyams_gis/tests/test_utilsdocstrings.py -src/pyams_gis/widget/__init__.py -src/pyams_gis/widget/area.py -src/pyams_gis/widget/point.py -src/pyams_gis/widget/templates/geoarea-input.pt -src/pyams_gis/widget/templates/geopoint-input.pt src/pyams_gis/zmi/__init__.py src/pyams_gis/zmi/interfaces.py src/pyams_gis/zmi/layer.py -src/pyams_gis/zmi/utility.py \ No newline at end of file +src/pyams_gis/zmi/utility.py +src/pyams_gis/zmi/widget/__init__.py +src/pyams_gis/zmi/widget/area.py +src/pyams_gis/zmi/widget/point.py +src/pyams_gis/zmi/widget/templates/geoarea-input.pt +src/pyams_gis/zmi/widget/templates/geopoint-input.pt \ No newline at end of file diff -r 37970a213463 -r 35c64c85e5f5 src/pyams_gis/resources/js/leaflet-esri-geocoder-2.2.4.min.js --- a/src/pyams_gis/resources/js/leaflet-esri-geocoder-2.2.4.min.js Thu Jul 12 17:40:07 2018 +0200 +++ b/src/pyams_gis/resources/js/leaflet-esri-geocoder-2.2.4.min.js Fri Jul 20 12:51:02 2018 +0200 @@ -1,1 +1,1 @@ -(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?a(exports,require("leaflet"),require("esri-leaflet")):typeof define==="function"&&define.amd?define(["exports","leaflet","esri-leaflet"],a):(a((b.L=b.L||{},b.L.esri=b.L.esri||{},b.L.esri.Geocoding=b.L.esri.Geocoding||{}),b.L,b.L.esri))}(this,function(y,g,w){g="default" in g?g["default"]:g;var d="2.2.4";var t=w.Task.extend({path:"findAddressCandidates",params:{outSr:4326,forStorage:false,outFields:"*",maxLocations:20},setters:{address:"address",neighborhood:"neighborhood",city:"city",subregion:"subregion",region:"region",postal:"postal",country:"country",text:"singleLine",category:"category",token:"token",key:"magicKey",fields:"outFields",forStorage:"forStorage",maxLocations:"maxLocations"},initialize:function(z){z=z||{};z.url=z.url||i;w.Task.prototype.initialize.call(this,z)},within:function(z){z=g.latLngBounds(z);this.params.searchExtent=w.Util.boundsToExtent(z);return this},nearby:function(A,z){A=g.latLng(A);this.params.location=A.lng+","+A.lat;this.params.distance=Math.min(Math.max(z,2000),50000);return this},run:function(A,z){if(this.options.customParam){this.params[this.options.customParam]=this.params.singleLine;delete this.params.singleLine}return this.request(function(C,B){var E=this._processGeocoderResponse;var D=(!C)?E(B):undefined;A.call(z,C,{results:D},B)},this)},_processGeocoderResponse:function(z){var B=[];for(var A=0;A-1){this.options.supportsSuggest=true}else{this.options.supportsSuggest=false}}},this)}});function r(z){return new c(z)}var f=g.Evented.extend({options:{zoomToResult:true,useMapBounds:12,searchBounds:null},initialize:function(A,z){g.Util.setOptions(this,z);this._control=A;if(!z||!z.providers||!z.providers.length){throw new Error("You must specify at least one provider")}this._providers=z.providers},_geocode:function(F,C,E){var A=0;var z=[];var D;var G=g.Util.bind(function(H,I){A--;if(H){return}if(I){z=z.concat(I)}if(A<=0){D=this._boundsFromResults(z);this.fire("results",{results:z,bounds:D,latlng:(D)?D.getCenter():undefined,text:F},true);if(this.options.zoomToResult&&D){this._control._map.fitBounds(D)}this.fire("load")}},this);if(C){A++;E.results(F,C,this._searchBounds(),G)}else{for(var B=0;B=0;D--){var z=E[D];A.push(z.latlng);if(z.bounds&&z.bounds.isValid()&&!z.bounds.equals(B)){G.push(z.bounds)}}var F=g.latLngBounds(A);for(var C=0;C0){this._suggestions.style.display="block"}this._suggestions.style.maxHeight=(this._map.getSize().y-this._suggestions.offsetTop-this._wrapper.offsetTop-10)+"px";var z=[];var F;var D;var H=[];for(var C=0;C1&&G!==B.provider.options.label){D=g.DomUtil.create("span","geocoder-control-header",this._suggestions);D.textContent=B.provider.options.label;D.innerText=B.provider.options.label;G=B.provider.options.label;z.push(D)}if(!F){F=g.DomUtil.create("ul","geocoder-control-list",this._suggestions)}if(H.indexOf(B.text)===-1){var I=g.DomUtil.create("li","geocoder-control-suggestion",F);I.innerHTML=B.text;I.provider=B.provider;I["data-magic-key"]=B.magicKey}else{for(var A=0;A=0;D--){var z=E[D];A.push(z.latlng);if(z.bounds&&z.bounds.isValid()&&!z.bounds.equals(B)){G.push(z.bounds)}}var F=g.latLngBounds(A);for(var C=0;C=2){this._geosearchCore._geocode(this._input.value,undefined);this.clear()}else{if(H.length===1){g.DomUtil.addClass(H[0],"geocoder-control-selected");this._geosearchCore._geocode(H[0].innerHTML,H[0]["data-magic-key"],H[0].provider)}else{this.clear();this._input.blur()}}}g.DomEvent.preventDefault(G);break;case 38:if(D){g.DomUtil.removeClass(D,"geocoder-control-selected")}var F=H[J-1];if(D&&F){g.DomUtil.addClass(F,"geocoder-control-selected")}else{g.DomUtil.addClass(H[H.length-1],"geocoder-control-selected")}g.DomEvent.preventDefault(G);break;case 40:if(D){g.DomUtil.removeClass(D,"geocoder-control-selected")}var B=H[J+1];if(D&&B){g.DomUtil.addClass(B,"geocoder-control-selected")}else{g.DomUtil.addClass(H[0],"geocoder-control-selected")}g.DomEvent.preventDefault(G);break;default:for(var I=0;I=0;I--){var H=J.features[I];E.push({text:this.options.formatSuggestion.call(this,H),magicKey:H.id})}D(G,E.slice(0,this.options.maxResults))}},this);return z},results:function(C,z,A,D){var B=this._resultsQuery;if(z){delete B.params.where;B.featureIds([z])}else{B.where(this._buildQuery(C))}if(A){B.within(A)}return B.run(g.Util.bind(function(F,J){var I=[];for(var H=0;H=0;z--){var A='upper("'+this.options.searchFields[z]+'")';C.push(A+" LIKE upper('%"+B+"%')")}if(this.options.where){return this.options.where+" AND ("+C.join(" OR ")+")"}else{return C.join(" OR ")}},_featureBounds:function(B){var A=g.geoJson(B);if(B.geometry.type==="Point"){var z=A.getBounds().getCenter();var D=((this.options.bufferRadius/40075017)*360)/Math.cos((180/Math.PI)*z.lat);var C=(this.options.bufferRadius/40075017)*360;return g.latLngBounds([z.lat-C,z.lng-D],[z.lat+C,z.lng+D])}else{return A.getBounds()}}});function u(z){return new j(z)}var n=w.MapService.extend({options:{layers:[0],label:"Map Service",bufferRadius:1000,maxResults:5,formatSuggestion:function(z){return z.properties[z.displayFieldName]+" "+z.layerName+""}},initialize:function(z){w.MapService.prototype.initialize.call(this,z);this._getIdFields()},suggestions:function(B,A,C){var z=this.find().text(B).fields(this.options.searchFields).returnGeometry(false).layers(this.options.layers);return z.run(function(J,E,K){var I=[];if(!J){var H=Math.min(this.options.maxResults,E.features.length);K.results=K.results.reverse();for(var F=0;F-1){this.options.supportsSuggest=true}else{this.options.supportsSuggest=false}}},this)}});function r(z){return new c(z)}var f=g.Evented.extend({options:{zoomToResult:true,useMapBounds:12,searchBounds:null},initialize:function(A,z){g.Util.setOptions(this,z);this._control=A;if(!z||!z.providers||!z.providers.length){throw new Error("You must specify at least one provider")}this._providers=z.providers},_geocode:function(F,C,E){var A=0;var z=[];var D;var G=g.Util.bind(function(H,I){A--;if(H){return}if(I){z=z.concat(I)}if(A<=0){D=this._boundsFromResults(z);this.fire("results",{results:z,bounds:D,latlng:(D)?D.getCenter():undefined,text:F},true);if(this.options.zoomToResult&&D){this._control._map.fitBounds(D)}this.fire("load")}},this);if(C){A++;E.results(F,C,this._searchBounds(),G)}else{for(var B=0;B=0;D--){var z=E[D];A.push(z.latlng);if(z.bounds&&z.bounds.isValid()&&!z.bounds.equals(B)){G.push(z.bounds)}}var F=g.latLngBounds(A);for(var C=0;C0){this._suggestions.style.display="block"}this._suggestions.style.maxHeight=(this._map.getSize().y-this._suggestions.offsetTop-this._wrapper.offsetTop-10)+"px";var z=[];var F;var D;var H=[];for(var C=0;C1&&G!==B.provider.options.label){D=g.DomUtil.create("span","geocoder-control-header",this._suggestions);D.textContent=B.provider.options.label;D.innerText=B.provider.options.label;G=B.provider.options.label;z.push(D)}if(!F){F=g.DomUtil.create("ul","geocoder-control-list",this._suggestions)}if(H.indexOf(B.text)===-1){var I=g.DomUtil.create("li","geocoder-control-suggestion",F);I.innerHTML=B.text;I.provider=B.provider;I["data-magic-key"]=B.magicKey}else{for(var A=0;A=0;D--){var z=E[D];A.push(z.latlng);if(z.bounds&&z.bounds.isValid()&&!z.bounds.equals(B)){G.push(z.bounds)}}var F=g.latLngBounds(A);for(var C=0;C=2){this._geosearchCore._geocode(this._input.value,undefined);this.clear()}else{if(H.length===1){g.DomUtil.addClass(H[0],"geocoder-control-selected");this._geosearchCore._geocode(H[0].innerHTML,H[0]["data-magic-key"],H[0].provider)}else{this.clear();this._input.blur()}}}g.DomEvent.preventDefault(G);break;case 38:if(D){g.DomUtil.removeClass(D,"geocoder-control-selected")}var F=H[J-1];if(D&&F){g.DomUtil.addClass(F,"geocoder-control-selected")}else{g.DomUtil.addClass(H[H.length-1],"geocoder-control-selected")}g.DomEvent.preventDefault(G);break;case 40:if(D){g.DomUtil.removeClass(D,"geocoder-control-selected")}var B=H[J+1];if(D&&B){g.DomUtil.addClass(B,"geocoder-control-selected")}else{g.DomUtil.addClass(H[0],"geocoder-control-selected")}g.DomEvent.preventDefault(G);break;default:for(var I=0;I=0;I--){var H=J.features[I];E.push({text:this.options.formatSuggestion.call(this,H),magicKey:H.id})}D(G,E.slice(0,this.options.maxResults))}},this);return z},results:function(C,z,A,D){var B=this._resultsQuery;if(z){delete B.params.where;B.featureIds([z])}else{B.where(this._buildQuery(C))}if(A){B.within(A)}return B.run(g.Util.bind(function(F,J){var I=[];for(var H=0;H=0;z--){var A='upper("'+this.options.searchFields[z]+'")';C.push(A+" LIKE upper('%"+B+"%')")}if(this.options.where){return this.options.where+" AND ("+C.join(" OR ")+")"}else{return C.join(" OR ")}},_featureBounds:function(B){var A=g.geoJson(B);if(B.geometry.type==="Point"){var z=A.getBounds().getCenter();var D=((this.options.bufferRadius/40075017)*360)/Math.cos((180/Math.PI)*z.lat);var C=(this.options.bufferRadius/40075017)*360;return g.latLngBounds([z.lat-C,z.lng-D],[z.lat+C,z.lng+D])}else{return A.getBounds()}}});function u(z){return new j(z)}var n=w.MapService.extend({options:{layers:[0],label:"Map Service",bufferRadius:1000,maxResults:5,formatSuggestion:function(z){return z.properties[z.displayFieldName]+" "+z.layerName+""}},initialize:function(z){w.MapService.prototype.initialize.call(this,z);this._getIdFields()},suggestions:function(B,A,C){var z=this.find().text(B).fields(this.options.searchFields).returnGeometry(false).layers(this.options.layers);return z.run(function(J,E,K){var I=[];if(!J){var H=Math.min(this.options.maxResults,E.features.length);K.results=K.results.reverse();for(var F=0;F=0;h--){var g=j[h];var l=g.id;var k=new a.LatLng(g.geometry.coordinates[1],g.geometry.coordinates[0]);this._cache[l]=k;if(!this._active[l]&&(!this.options.timeField||(this.options.timeField&&this._featureWithinTimeRange(g)))){this._active[l]=k;this.heat._latlngs.push(k)}}this.heat.redraw()},addLayers:function(h){for(var g=h.length-1;g>=0;g--){var k=h[g];if(!this._active[k]){var j=this._cache[k];this.heat._latlngs.push(j);this._active[k]=j}}this.heat.redraw()},removeLayers:function(j,k){var h=[];for(var g=j.length-1;g>=0;g--){var m=j[g];if(this._active[m]){delete this._active[m]}if(this._cache[m]&&k){delete this._cache[m]}}for(var l in this._active){h.push(this._active[l])}this.heat.setLatLngs(h)},setOptions:function(g){this.heat.setOptions(g)},redraw:function(){this.heat.redraw()}});function e(g){return new f(g)}c.FeatureLayer=f;c.featureLayer=e;c["default"]=e;c.VERSION=b})); \ No newline at end of file +q(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?a(exports,require("leaflet"),require("esri-leaflet")):typeof define==="function"&&define.amd?define(["exports","leaflet","esri-leaflet"],a):(a((b.L=b.L||{},b.L.esri=b.L.esri||{},b.L.esri.Heat=b.L.esri.Heat||{}),b.L,b.L.esri))}(this,function(c,a,d){a="default" in a?a["default"]:a;var b="2.0.0";var f=d.FeatureManager.extend({initialize:function(g){d.FeatureManager.prototype.initialize.call(this,g);g=a.setOptions(this,g);this._cache={};this._active={};this.heat=window.L.heatLayer([],g)},onAdd:function(g){d.FeatureManager.prototype.onAdd.call(this,g);this._map.addLayer(this.heat)},onRemove:function(g){d.FeatureManager.prototype.onRemove.call(this,g);this._map.removeLayer(this.heat)},createLayers:function(j){for(var h=j.length-1;h>=0;h--){var g=j[h];var l=g.id;var k=new a.LatLng(g.geometry.coordinates[1],g.geometry.coordinates[0]);this._cache[l]=k;if(!this._active[l]&&(!this.options.timeField||(this.options.timeField&&this._featureWithinTimeRange(g)))){this._active[l]=k;this.heat._latlngs.push(k)}}this.heat.redraw()},addLayers:function(h){for(var g=h.length-1;g>=0;g--){var k=h[g];if(!this._active[k]){var j=this._cache[k];this.heat._latlngs.push(j);this._active[k]=j}}this.heat.redraw()},removeLayers:function(j,k){var h=[];for(var g=j.length-1;g>=0;g--){var m=j[g];if(this._active[m]){delete this._active[m]}if(this._cache[m]&&k){delete this._cache[m]}}for(var l in this._active){h.push(this._active[l])}this.heat.setLatLngs(h)},setOptions:function(g){this.heat.setOptions(g)},redraw:function(){this.heat.redraw()}});function e(g){return new f(g)}c.FeatureLayer=f;c.featureLayer=e;c["default"]=e;c.VERSION=b}));