diff --git a/Gruntfile.js b/Gruntfile.js
index 591b50c..9119128 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -29,7 +29,7 @@ module.exports = function(grunt) {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> Environmental Systems Research Institute, Inc.\n' +
- '* Apache License' +
+ '* Apache 2.0 License ' +
'*/\n\n'
},
js: {
@@ -65,7 +65,7 @@ module.exports = function(grunt) {
expand: true,
cwd: 'src/',
src: ['img/*.{png,jpg,gif}'],
- dest: 'dist/img'
+ dest: 'dist/'
}]
}
},
diff --git a/README.md b/README.md
index a9e3e59..7fe3794 100644
--- a/README.md
+++ b/README.md
@@ -44,13 +44,13 @@ Take a look at the live demo at http://esri.github.io/esri-leaflet-geocoder/
var map = L.map('map').setView([45.5165, -122.6764], 12);
var tiles = L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(map);
-
+
// create the geocoding control and add it to the map
var searchControl = new L.esri.Controls.Geosearch().addTo(map);
-
+
// create an empty layer group to store the results and add it to the map
var results = new L.LayerGroup().addTo(map);
-
+
// listen for the results event and add every result to the map
searchControl.on("results", function(data){
results.clearLayers();
@@ -108,7 +108,7 @@ For reference here is the internal structure of the geocoder...
```html
-
+
@@ -157,7 +157,7 @@ Constructor | Options | Description
Option | Type | Default | Description
--- | --- | --- | ---
`url` | `String` | `` | Defaults to the ArcGIS World Geocoding service.
-`outFields`| `String` | "Subregion, Region, PlaceName, Match_addr, Country, Addr_type, City, Place_addr" | The fields from the service that you would like returned.
+`outFields`| `String` | "Subregion, Region, PlaceName, Match_addr, Country, Addr_type, City, Place_addr" | The fields from the service that you would like returned.
### Methods
@@ -226,7 +226,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+> http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@@ -234,7 +234,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-A copy of the license is available in the repository's [license.txt]( https://raw.github.com/Esri/esri-leaflet/master/license.txt) file.
+A copy of the license is available in the repository's [license.txt]( https://raw.github.com/Esri/esri-leaflet-geocoder/master/license.txt) file.
[](Esri Tags: ArcGIS Web Mapping Leaflet Geocoding)
[](Esri Language: JavaScript)
diff --git a/dist/esri-leaflet-geocoder-src.css b/dist/esri-leaflet-geocoder-src.css
index 20a362e..e5c287d 100644
--- a/dist/esri-leaflet-geocoder-src.css
+++ b/dist/esri-leaflet-geocoder-src.css
@@ -1,6 +1,6 @@
-/*! esri-leaflet-geocoder - v0.0.1 - 2014-02-25
+/*! esri-leaflet-geocoder - v0.0.1-beta.2 - 2014-02-25
* Copyright (c) 2014 Environmental Systems Research Institute, Inc.
-* Apache License*/
+* Apache 2.0 License */
.geocoder-control-input {
background-color: white;
diff --git a/dist/esri-leaflet-geocoder-src.js b/dist/esri-leaflet-geocoder-src.js
index 0eb0025..96287f0 100644
--- a/dist/esri-leaflet-geocoder-src.js
+++ b/dist/esri-leaflet-geocoder-src.js
@@ -1,6 +1,6 @@
-/*! esri-leaflet-geocoder - v0.0.1 - 2014-02-25
+/*! esri-leaflet-geocoder - v0.0.1-beta.2 - 2014-02-25
* Copyright (c) 2014 Environmental Systems Research Institute, Inc.
-* Apache License*/
+* Apache 2.0 License */
(function(L){
diff --git a/dist/esri-leaflet-geocoder.css b/dist/esri-leaflet-geocoder.css
index d099e96..0136c00 100644
--- a/dist/esri-leaflet-geocoder.css
+++ b/dist/esri-leaflet-geocoder.css
@@ -1,3 +1,3 @@
-/*! esri-leaflet-geocoder - v0.0.1 - 2014-02-25
+/*! esri-leaflet-geocoder - v0.0.1-beta.2 - 2014-02-25
* Copyright (c) 2014 Environmental Systems Research Institute, Inc.
-* Apache License*/.geocoder-control-input{background-color:#fff;background-repeat:no-repeat;background-image:url(img/search.png);background-size:14px 14px;border:0;padding:0;text-indent:6px;font-size:13px;height:26px;width:26px;line-height:26px;background-position:center center;-webkit-transition:all .125s ease-in;-moz-transition:all .125s ease-in;-ms-transition:all .125s ease-in;-o-transition:all .125s ease-in;transition:all .125s ease-in;cursor:pointer}.geocoder-control{width:26px;-webkit-transition:all .175s ease-in;-moz-transition:all .175s ease-in;-ms-transition:all .175s ease-in;-o-transition:all .175s ease-in;transition:all .175s ease-in}.geocoder-control-expanded,.geocoder-control-expanded .geocoder-control-input{width:275px}.geocoder-control.geocoder-control-expanded .geocoder-control-input{background-position:98% center}.geocoder-control-input.geocoder-control-loading{background-image:url(img/loading.gif);background-size:16px 16px}@media only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.geocoder-control-input{background-image:url(img/search@2x.png)}.geocoder-control-input.geocoder-control-loading{background-image:url(img/loading@2x.gif)}}.geocoder-control-input:focus{outline:0;cursor:text}.geocoder-control-input::-ms-clear{display:none}.geocoder-control-suggestions{width:100%;list-style:none;padding:0;margin:10px 0 0;overflow:hidden;display:none}.geocoder-control-suggestions .geocoder-control-suggestion{font-size:13px;padding:7px;background:#fff;border-top:1px solid #f1f1f1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.geocoder-control-suggestions .geocoder-control-suggestion:first-child{border:0}.geocoder-control-suggestions .geocoder-control-suggestion.geocoder-control-selected,.geocoder-control-suggestions .geocoder-control-suggestion:hover{background:#00c0ff;border-color:#00c0ff}.leaflet-touch .geocoder-control-input{width:30px;height:30px;line-height:30px}.leaflet-touch .geocoder-control-expanded,.geocoder-control-expanded .geocoder-control-input{width:275px}.leaflet-oldie .geocoder-control-input{border:1px solid #999}
\ No newline at end of file
+* Apache 2.0 License */.geocoder-control-input{background-color:#fff;background-repeat:no-repeat;background-image:url(img/search.png);background-size:14px 14px;border:0;padding:0;text-indent:6px;font-size:13px;height:26px;width:26px;line-height:26px;background-position:center center;-webkit-transition:all .125s ease-in;-moz-transition:all .125s ease-in;-ms-transition:all .125s ease-in;-o-transition:all .125s ease-in;transition:all .125s ease-in;cursor:pointer}.geocoder-control{width:26px;-webkit-transition:all .175s ease-in;-moz-transition:all .175s ease-in;-ms-transition:all .175s ease-in;-o-transition:all .175s ease-in;transition:all .175s ease-in}.geocoder-control-expanded,.geocoder-control-expanded .geocoder-control-input{width:275px}.geocoder-control.geocoder-control-expanded .geocoder-control-input{background-position:98% center}.geocoder-control-input.geocoder-control-loading{background-image:url(img/loading.gif);background-size:16px 16px}@media only screen and (min--moz-device-pixel-ratio:2),only screen and (-o-min-device-pixel-ratio:2/1),only screen and (-webkit-min-device-pixel-ratio:2),only screen and (min-device-pixel-ratio:2){.geocoder-control-input{background-image:url(img/search@2x.png)}.geocoder-control-input.geocoder-control-loading{background-image:url(img/loading@2x.gif)}}.geocoder-control-input:focus{outline:0;cursor:text}.geocoder-control-input::-ms-clear{display:none}.geocoder-control-suggestions{width:100%;list-style:none;padding:0;margin:10px 0 0;overflow:hidden;display:none}.geocoder-control-suggestions .geocoder-control-suggestion{font-size:13px;padding:7px;background:#fff;border-top:1px solid #f1f1f1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.geocoder-control-suggestions .geocoder-control-suggestion:first-child{border:0}.geocoder-control-suggestions .geocoder-control-suggestion.geocoder-control-selected,.geocoder-control-suggestions .geocoder-control-suggestion:hover{background:#00c0ff;border-color:#00c0ff}.leaflet-touch .geocoder-control-input{width:30px;height:30px;line-height:30px}.leaflet-touch .geocoder-control-expanded,.geocoder-control-expanded .geocoder-control-input{width:275px}.leaflet-oldie .geocoder-control-input{border:1px solid #999}
\ No newline at end of file
diff --git a/dist/esri-leaflet-geocoder.js b/dist/esri-leaflet-geocoder.js
index ad2f3ca..a94b11e 100644
--- a/dist/esri-leaflet-geocoder.js
+++ b/dist/esri-leaflet-geocoder.js
@@ -1,4 +1,4 @@
-/*! esri-leaflet-geocoder - v0.0.1 - 2014-02-25
+/*! esri-leaflet-geocoder - v0.0.1-beta.2 - 2014-02-25
* Copyright (c) 2014 Environmental Systems Research Institute, Inc.
-* Apache License*/
-!function(a){function b(a,b){b=b||window;for(var c,d=b,e=a.split(".");c=e.shift();)d[c]||(d[c]={}),d=d[c];return d}function c(a){var b="?";for(var c in a)if(a.hasOwnProperty(c)){var d=c,e=a[c];b+=encodeURIComponent(d),b+="=",b+=encodeURIComponent(e),b+="&"}return b.substring(0,b.length-1)}function d(b){var c=new a.LatLng(b.ymin,b.xmin),d=new a.LatLng(b.ymax,b.xmax);return new a.LatLngBounds(c,d)}b("L.esri.Services.Geocoding"),b("L.esri.Controls.Geosearch"),a.esri.Services.Geocoding=a.Class.extend({includes:a.Mixin.Events,options:{url:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/",outFields:"Subregion, Region, PlaceName, Match_addr, Country, Addr_type, City, Place_addr"},initialize:function(b){a.Util.setOptions(this,b)},request:function(b,d,e){var f="c"+(1e9*Math.random()).toString(36).replace(".","_");d.f="json",d.callback="L.esri.Services.Geocoding._callback."+f;var g=document.createElement("script");g.type="text/javascript",g.src=b+c(d),g.id=f,this.fire("loading"),a.esri.Services.Geocoding._callback[f]=a.Util.bind(function(b){this.fire("load"),e(b),document.body.removeChild(g),delete a.esri.Services.Geocoding._callback[f]},this),document.body.appendChild(g)},geocode:function(b,c,d){var e={outFields:this.options.outFields},f=a.extend(e,c);f.text=b,this.request(this.options.url+"find",f,d)},suggest:function(a,b,c){var d=b||{};d.text=a,this.request(this.options.url+"suggest",d,c)}}),a.esri.Services.geocoding=function(b){return new a.esri.Services.Geocoding(b)},a.esri.Services.Geocoding._callback={},a.esri.Controls.Geosearch=a.Control.extend({includes:a.Mixin.Events,options:{position:"topleft",zoomToResult:!0,useMapBounds:11,collapseAfterResult:!0,expanded:!1,maxResults:25},initialize:function(b){a.Util.setOptions(this,b),this._service=new a.esri.Services.Geocoding},_processMatch:function(b,c){var e=c.feature.attributes,f=d(c.extent);return{text:b,bounds:f,latlng:new a.LatLng(c.feature.geometry.y,c.feature.geometry.x),name:e.PlaceName,match:e.Addr_type,country:e.Country,region:e.Region,subregion:e.Subregion,city:e.City,address:e.Place_addr?e.Place_addr:e.Match_addr}},_geocode:function(b,c){var d={};if(c)d.magicKey=c;else{var e=this._map.getBounds(),f=e.getCenter(),g=e.getNorthWest();d.bbox=e.toBBoxString(),d.maxLocations=this.options.maxResults,d.location=f.lng+","+f.lat,d.distance=Math.min(Math.max(f.distanceTo(g),2e3),5e4)}a.DomUtil.addClass(this._input,"geocoder-control-loading"),this.fire("loading"),this._service.geocode(b,d,a.Util.bind(function(c){if(c.error)this.fire("error",{code:c.error.code,message:c.error.messsage});else if(c.locations.length){var d,e=[],f=new a.LatLngBounds;for(d=c.locations.length-1;d>=0;d--)e.push(this._processMatch(b,c.locations[d]));for(d=e.length-1;d>=0;d--)f.extend(e[d].bounds);this.fire("results",{results:e,bounds:f,latlng:f.getCenter()}),this.options.zoomToResult&&this._map.fitBounds(f)}else this.fire("results",{results:[],bounds:null,latlng:null,text:b});a.DomUtil.removeClass(this._input,"geocoder-control-loading"),this.fire("load"),this.clear(),this._input.blur()},this))},_suggest:function(b){a.DomUtil.addClass(this._input,"geocoder-control-loading");var c={};if(this.options.useMapBounds===!0||this._map.getZoom()>=this.options.useMapBounds){var d=this._map.getBounds(),e=d.getCenter(),f=d.getNorthWest();c.location=e.lng+","+e.lat,c.distance=Math.min(Math.max(e.distanceTo(f),2e3),5e4)}this._service.suggest(b,c,a.Util.bind(function(b){if(this._input.value){if(this._suggestions.innerHTML="",this._suggestions.style.display="none",b.suggestions){this._suggestions.style.display="block";for(var c=0;c=0;d--)e.push(this._processMatch(b,c.locations[d]));for(d=e.length-1;d>=0;d--)f.extend(e[d].bounds);this.fire("results",{results:e,bounds:f,latlng:f.getCenter()}),this.options.zoomToResult&&this._map.fitBounds(f)}else this.fire("results",{results:[],bounds:null,latlng:null,text:b});a.DomUtil.removeClass(this._input,"geocoder-control-loading"),this.fire("load"),this.clear(),this._input.blur()},this))},_suggest:function(b){a.DomUtil.addClass(this._input,"geocoder-control-loading");var c={};if(this.options.useMapBounds===!0||this._map.getZoom()>=this.options.useMapBounds){var d=this._map.getBounds(),e=d.getCenter(),f=d.getNorthWest();c.location=e.lng+","+e.lat,c.distance=Math.min(Math.max(e.distanceTo(f),2e3),5e4)}this._service.suggest(b,c,a.Util.bind(function(b){if(this._input.value){if(this._suggestions.innerHTML="",this._suggestions.style.display="none",b.suggestions){this._suggestions.style.display="block";for(var c=0;c