[search] show outline and icon from nominatim
This commit is contained in:
parent
455e2c0535
commit
6533dd5d0d
@ -274,8 +274,19 @@ addHook('search', function(query) {
|
|||||||
title: item.display_name,
|
title: item.display_name,
|
||||||
description: 'Type: ' + item.type,
|
description: 'Type: ' + item.type,
|
||||||
position: L.latLng(parseFloat(item.lat), parseFloat(item.lon)),
|
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;
|
var b = item.boundingbox;
|
||||||
if(b) {
|
if(b) {
|
||||||
var southWest = new L.LatLng(b[0], b[2]),
|
var southWest = new L.LatLng(b[0], b[2]),
|
||||||
|
2
main.js
2
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.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 = '//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 /////////////////////////////////////////////////
|
// INGRESS CONSTANTS /////////////////////////////////////////////////
|
||||||
// http://decodeingress.me/2012/11/18/ingress-portal-levels-and-link-range/
|
// http://decodeingress.me/2012/11/18/ingress-portal-levels-and-link-range/
|
||||||
|
@ -549,6 +549,7 @@ input[type="search"], input[type="url"] {
|
|||||||
padding-left: 14px;
|
padding-left: 14px;
|
||||||
background-position: 1px center;
|
background-position: 1px center;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
background-size: 12px 12px;
|
||||||
}
|
}
|
||||||
#searchwrapper li:focus a, #searchwrapper li:hover a {
|
#searchwrapper li:focus a, #searchwrapper li:hover a {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user