Recently I added a ‘search’ feature to my app which uses
google.maps.Geocoder(). The user can tell the app to either (1)
display a map showing the first ‘hit’ returned by Google or (2)
display a list of all the hits returned by Google.
If you want to experiment with the geocoder and see the complete list
of hits returned by Google in response to your search request, then
the link below will open my app with a world map. Click Menu ==>
Search. Note that I have only recently added this feature and based
on user feedback I will be making some tweaks to improve the user
friendliness of this feature.
http://www.mappingsupport.com/p/gmap4.php?ll=38.259207,-16.760195&t=t1&z=2
Since my app particularly targets hikers/climbers, many of my users
will search based on names of mountains or other natural features.
Alas, I have been unable to find any info online with tips for how
best to use the geocoder with names of natural features.
Here is one thing I have learned by trial-and-error. If you search on
a single word plus the name of a political subdivision (state/province/
etc) then Google builds a list of hits that includes your search name
anywhere in the name of the hit. For example, compare the list of
hits that the Google geocoder generates for these two searches:
daniel
daniel wa ((Washington State, also West Australia ))
For the second search the hits include a mountain, a steakhouse and
various roads.
But wait, there is an exception to the above statement. If the name
you searched on is the name of any kind of town, even one that is now
gone, Google will only return the location of that town and will not
return any other hit. For example a search on ‘novelty wa’ only
returns the location of this long-gone settlement. If you do this
search with my app and then change the map view to MyTopo, you will
see the name “Novelty” on the map. I live a few miles away and there
is nothing at that location.
Now search on “novelty road wa’. You will get several hits related to
roads. Yet none of those hits were returned when you searched on
‘novelty wa’.
If anyone else is also experimenting with sending names of natural
features to google.maps.Geocoder(), please share any insights you
glean as to the workings of the geocoder.