data = response.split(/\s*,\s+/) # lat,long,town,state,zip
@results.push({:lat => data[0], :lon => data[1],
:zoom => APP_CONFIG['postcode_zoom'],
- :prefix => "#{data[2]}, #{data[3]}, ",
+ :prefix => "#{data[2]}, #{data[3]},",
:name => data[4]})
end
html_options[:href] = "?mlat=#{result[:lat]}&mlon=#{result[:lon]}&zoom=#{result[:zoom]}"
html = ""
html << result[:prefix] if result[:prefix]
+ html << " " if result[:prefix] and result[:name]
html << link_to_function(result[:name],"setPosition(#{result[:lat]}, #{result[:lon]}, #{result[:zoom]})", html_options) if result[:name]
html << result[:suffix] if result[:suffix]
return html
osm_namefinder: 'Suchergebnisse von <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>'
geonames: 'Suchergebnisse von <a href="http://www.geonames.org/">GeoNames</a>'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{distance}} {{direction}} von {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} von {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: Städte
places: Orte
description_osm_namefinder:
- prefix: "{{distance}} {{direction}} von {{type}} "
+ prefix: "{{distance}} {{direction}} von {{type}}"
results:
no_results: "Keine Ergebnisse"
distance:
osm_namefinder: 'Results from <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>'
geonames: 'Results from <a href="http://www.geonames.org/">GeoNames</a>'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{distance}} {{direction}} of {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} of {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: Towns
places: Places
description_osm_namefinder:
- prefix: "{{distance}} {{direction}} of {{type}} "
+ prefix: "{{distance}} {{direction}} of {{type}}"
results:
no_results: "No results found"
distance:
osm_namefinder: 'Eredmények az <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>ről'
geonames: 'Eredmények a <a href="http://www.geonames.org/">GeoNames</a>ről'
search_osm_namefinder:
- prefix: "{{type}}: "
+ prefix: "{{type}}:"
suffix_place: " {{distance}}-re {{direction}} innen: {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}}-re {{parentdirection}} innen: {{parentname}})"
suffix_suburb: "{{suffix}} ({{parentname}})"
towns: Városok
places: Helyek
description_osm_namefinder:
- prefix: "{{type}}: {{distance}}-re {{direction}} "
+ prefix: "{{type}}: {{distance}}-re {{direction}}"
results:
no_results: "Nem találhatók eredmények"
distance:
osm_namefinder: 'Niðurstöður frá <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>'
geonames: 'Niðurstöður frá <a href="http://www.geonames.org/">GeoNames</a>'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{distance}} {{direction}} af {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} af {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: Bæir
places: Staðir
description_osm_namefinder:
- prefix: "{{distance}} {{direction}} af{{type}} "
+ prefix: "{{distance}} {{direction}} af{{type}}"
results:
no_results: "Ekkert fannst"
distance:
osm_namefinder: 'Resultados do <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>'
geonames: 'Resultados do <a href="http://www.geonames.org/">GeoNames</a>'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{distance}} {{direction}} de {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} de {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: "Cidades"
places: "Lugares"
description_osm_namefinder:
- prefix: "{{distance}} {{direction}} de {{type}} "
+ prefix: "{{distance}} {{direction}} de {{type}}"
results:
no_results: "Nenhum resultado encontrado"
distance:
osm_namefinder: 'Results from <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>'
geonames: 'Results from <a href="http://www.geonames.org/">GeoNames</a>'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{distance}} {{direction}} of {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} of {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: Towns
places: Places
description_osm_namefinder:
- prefix: "{{distance}} {{direction}} of {{type}} "
+ prefix: "{{distance}} {{direction}} of {{type}}"
results:
no_results: "No results found"
distance:
osm_namefinder: 'Zadetki iz <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>'
geonames: 'Zadetki iz <a href="http://www.geonames.org/">GeoNames</a>'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{distance}} {{direction}} od {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} od {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: Mesta
places: Kraji
description_osm_namefinder:
- prefix: "{{distance}} {{direction}} od {{type}} "
+ prefix: "{{distance}} {{direction}} od {{type}}"
results:
no_results: "Ni zadetkov"
distance:
osm_namefinder: 'Kết quả <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>'
geonames: 'Kết quả <a href="http://www.geonames.org/">GeoNames</a>'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{distance}} về phía {{direction}} của {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} về phía {{parentdirection}} của {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: "Thị xã"
places: "Địa điểm"
description_osm_namefinder:
- prefix: "{{distance}} về phía {{direction}} của {{type}} "
+ prefix: "{{distance}} về phía {{direction}} của {{type}}"
results:
no_results: "Không tìm thấy kết quả"
distance:
osm_namefinder: '來自<a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>的結果'
geonames: '來自<a href="http://www.geonames.org/">GeoNames</a>的結果'
search_osm_namefinder:
- prefix: "{{type}} "
+ prefix: "{{type}}"
suffix_place: ", {{direction}} {{distance}} / {{placename}}"
suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} / {{parentname}})"
suffix_suburb: "{{suffix}}, {{parentname}}"
towns: "鄉鎮"
places: "地區"
description_osm_namefinder:
- prefix: "{{distance}} {{direction}} / {{type}} "
+ prefix: "{{distance}} {{direction}} / {{type}}"
results:
no_results: "找不到任何結果"
distance: