Custom search URLs

atomic dryad shared this idea 10 years ago
Gathering feedback

It would be neat to be able to add customized search URLs; IE, "search wikipedia" would do:{LATITUDE}&lng={LONGITUDE}&range=20&limit=50&locale=en

Alot of stuff uses json with a similar structure, and decimal wgs coordinates, so parsing the return data could be done with simple rule definitions, the actual entry array name specified under 'entries', and entry variables specified by {varname}. If something just spits out KML the data parsing rule would be simple. The search query itself could be more complex with text input or a dropdown list. I suppose this could be done in an XML file but I'll use a simple format for examples. For wikilocation:

data: json

entries: articles

latitude: {lat}

longitude: {lng}

title: {title}

desc: '<a href="{url}">{type}</a>'

Other examples:

"search home poi database":{LATITUDE}&lng={LONGITUDE}&range=100km&amt=1024&namefilter={INPUT}&catfilter={LIST:spng|mt|etc|maybe|define|another|way}&format=kml

data: kml

This would add panoramio support as is:

"nearby panoramio":{MINLATITUDE}&miny={MINLONGITUDE}&maxx={MAXLATITUDE}&maxy={MAXLONGITUDE}&set=public&mapfilter=true

return: json

entries: photos





desc='<a href="{photo_url}"><img src="{photo_file_url}"></a>'

Even without the added complexity of defining parsing rules, just a way to add multiple custom search urls for 'wikilocation json' (perhaps with kml output too) would be great. I've already released a serverside script that returns data in the format expected by wikipedia search, however I'm having to do DNS trickery and use the rather limited 'locale' dropdown to specify specific search types:

Locus itself seems to handle alot of return data for wikipedia search, the following is a 75km radius geonames query on a local db, based on location, limited to 1024 pois: gBbtUQb

Leave a Comment
Attach a file