You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added the possibility to search by latitude & longitude in handleResults (quick & dirty). Then, you can type a lat/lon pair in the search box. When a valid pair is detected, it appears on top of the list, so that the user can select it easily.
handleResults: function(geojson)
{
var v = $('.photon-input').val();
var w = v.split(',');
if (w.length == 2)
{
var lat = parseFloat(w[0])
var lon = parseFloat(w[1])
if ((lat >= -90) & (lat <= 90) & (lon >= -180) & (lon <= 180))
{
// later : geocode the adress
var p = {"geometry":{"coordinates":[lon,lat],"type":"Point"},
"type":"Feature","properties":
{"osm_id":-1,"osm_type":"W","extent":[0,0,0,0],"country":"","osm_key":"","city":"","osm_value":"latitude/longitude","postcode":"","name": lat + ',' + lon,"state":""}}
geojson.features.unshift(p)
}
}
...
The text was updated successfully, but these errors were encountered:
Is this functionality useful for others ?
I added the possibility to search by latitude & longitude in handleResults (quick & dirty). Then, you can type a lat/lon pair in the search box. When a valid pair is detected, it appears on top of the list, so that the user can select it easily.
The text was updated successfully, but these errors were encountered: