diff --git a/code/search.js b/code/search.js index 1bf98fc1..6dc083b9 100644 --- a/code/search.js +++ b/code/search.js @@ -274,8 +274,19 @@ addHook('search', function(query) { title: item.display_name, description: 'Type: ' + item.type, position: L.latLng(parseFloat(item.lat), parseFloat(item.lon)), + icon: item.icon, }; + if(item.geojson) { + result.layer = L.geoJson(item.geojson, { + clickable: false, + color: 'red', + opacity: 0.7, + weight: 2, + fill: false, + }); + } + var b = item.boundingbox; if(b) { var southWest = new L.LatLng(b[0], b[2]), diff --git a/main.js b/main.js index 94de6556..bf3ffaa8 100644 --- a/main.js +++ b/main.js @@ -167,7 +167,7 @@ window.PORTAL_RADIUS_ENLARGE_MOBILE = 5; window.DEFAULT_PORTAL_IMG = '//commondatastorage.googleapis.com/ingress.com/img/default-portal-image.png'; //window.NOMINATIM = '//nominatim.openstreetmap.org/search?format=json&limit=1&q='; -window.NOMINATIM = '//open.mapquestapi.com/nominatim/v1/search.php?format=json&q='; +window.NOMINATIM = '//open.mapquestapi.com/nominatim/v1/search.php?format=json&polygon_geojson=1&q='; // INGRESS CONSTANTS ///////////////////////////////////////////////// // http://decodeingress.me/2012/11/18/ingress-portal-levels-and-link-range/ diff --git a/style.css b/style.css index 2a4be17e..d5dc290d 100644 --- a/style.css +++ b/style.css @@ -549,6 +549,7 @@ input[type="search"], input[type="url"] { padding-left: 14px; background-position: 1px center; background-repeat: no-repeat; + background-size: 12px 12px; } #searchwrapper li:focus a, #searchwrapper li:hover a { text-decoration: underline;