Update leaflet geocoder.

This commit is contained in:
David Molineus
2015-06-18 16:26:12 +02:00
parent b18d76f61e
commit 4ddb52925d
7 changed files with 43 additions and 9 deletions

View File

@@ -37,7 +37,7 @@
.leaflet-control-geocoder-icon {
width: 26px;
height: 26px;
background-image: url('images/geocoder.png');
background-image: url(images/geocoder.png);
background-repeat: no-repeat;
background-position: center;
float: right;
@@ -50,7 +50,7 @@
}
.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon {
background-image: url('images/throbber.gif');
background-image: url(images/throbber.gif);
}
.leaflet-control-geocoder-expanded input, .leaflet-control-geocoder-error {
@@ -137,4 +137,4 @@ ul.leaflet-control-geocoder-alternatives {
color: #666;
font-size: 12px;
font-weight: lighter;
}
}

View File

@@ -323,7 +323,7 @@
if (a.city || a.town || a.village) {
parts.push('<span class="' + (parts.length > 0 ? 'leaflet-control-geocoder-address-detail' : '') +
'">{postcode} {city}{town}{village}</span>');
'">{postcode} {city} {town} {village}</span>');
}
if (a.state || a.country) {
@@ -620,6 +620,10 @@
});
},
suggest: function(query, cb, context) {
return this.geocode(query, cb, context);
},
reverse: function(location, scale, cb, context) {
L.Control.Geocoder.getJSON(this.options.service_url + encodeURIComponent(location.lng) + ',' + encodeURIComponent(location.lat) + '.json', {
access_token: this._access_token,

File diff suppressed because one or more lines are too long

View File

@@ -2,7 +2,7 @@
I need to take some of your time. I can't believe we let shit like [the Kathy Sierra incident](http://www.wired.com/2014/10/trolls-will-always-win/) or [what happened to Brianna Wu](https://twitter.com/Spacekatgal/status/520739878993420290) happen over and over again. I can't believe we, the open source community, let [sexist, misogynous shit happen over and over again](http://geekfeminism.wikia.com/wiki/Timeline_of_incidents).
I strongly believe that it is my &mdash; and your &mdash; duty to make the open source community, as well as the tech community at large, a community where everyone feel welcome and is accepted. At the very minimum, that means making sure the community and its forums both _are_ safe, and are perceived as safe. It means being friendly and inclusive, even when you disagree with people. It means not shrugging of discussions about sexism and inclusiveness with [handwaving about censorship and free speech](https://josm.openstreetmap.de/ticket/10568). For a more elaborate document on what that means, [the NPM Code of Conduct](http://www.npmjs.com/policies/conduct) is a good start, [Geek Feminism's resources for allies](http://geekfeminism.wikia.com/wiki/Resources_for_allies) contains much more.
I strongly believe that it is my &mdash; and your &mdash; duty to make the open source community, as well as the tech community at large, a community where everyone feel welcome and is accepted. At the very minimum, that means making sure the community and its forums both _are_ safe, and are perceived as safe. It means being friendly and inclusive, even when you disagree with people. It means not shrugging off discussions about sexism and inclusiveness with [handwaving about censorship and free speech](https://josm.openstreetmap.de/ticket/10568). For a more elaborate document on what that means, [the NPM Code of Conduct](http://www.npmjs.com/policies/conduct) is a good start, [Geek Feminism's resources for allies](http://geekfeminism.wikia.com/wiki/Resources_for_allies) contains much more.
While I can't force anyone to do anything, if you happen to disagree with this, I ask of you not to use any of the open source I have published. Nor am I interested in contributions from people who can't accept or act respectfully towards other humans regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics. If you think feminism, anti-racism or the LGBT movement is somehow wrong, disturbing or irrelevant, I ask you to go elsewhere to find software.

View File

@@ -0,0 +1,30 @@
{
"name": "leaflet-control-geocoder",
"version": "1.1.0",
"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",
"moduleType": [
"amd",
"globals"
],
"keywords": [
"leaflet",
"geocoder",
"nominatim"
],
"license": "BSD-2-Clause",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"leaflet": "~0.7.2"
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "leaflet-control-geocoder",
"version": "1.0.0",
"version": "1.1.0",
"description": "Extendable geocoder with builtin OSM/Nominatim support",
"main": "Control.Geocoder.js",
"scripts": {

View File

@@ -72,10 +72,10 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-fullscreen'] = array
'javascript' => 'assets/leaflet/libs/leaflet-fullscreen/Control.FullScreen.min.js'
);
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocode'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocoder'] = array
(
'name' => 'Leaflet Control Geocoder',
'version' => '1.0.0',
'version' => '1.1.0',
'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',