Geocode location names

18 views
Skip to first unread message

isterin

unread,
Jun 13, 2009, 1:44:08 AM6/13/09
to Google Maps JavaScript API v3
I'm not sure if this is possible, but when using google maps
interface, you can type in things like "XYZ Inc, city, zip" or similar
and it will find the location(s) of XYZ companies, list them and use
the first one to mark on the interface. Unfortunately, using the
javascript geocoding API service, only address geocoding works, you
can't use location names.

Is there a way to do this, or is this a proprietary service that
google doesn't provide?

Thanks.

Barry Hunter

unread,
Jun 13, 2009, 12:47:12 PM6/13/09
to google-map...@googlegroups.com

Barry Hunter

unread,
Jun 13, 2009, 4:23:29 PM6/13/09
to google-map...@googlegroups.com
The localsearch control has not been implemented for for v3 yet.

You will for the moment need to create your own. Either using the
classes provided by the local search, or implement it so it directly
accesses the HTTP API.


On 13/06/2009, isterin <ste...@gmail.com> wrote:

> Ah, great, found it this morning, thanks for the reply. Now, I'm
> having some issues actually integrating this control into the version
> 3 of the map.
>
> The map is is displayed just fine...
>
> var map = new google.maps.Map($('#mapDiv').get(0), {
> zoom: 14,
> center: latlon,
> mapTypeId: google.maps.MapTypeId.ROADMAP
> });
>
> but then...
>
> var lsc = new google.elements.LocalSearch();
> map.addControl(lsc);
>
> Yields "Can't find variable GControl". I see the the version 3 apis
> don't have a GControl class, so how would one integrate V3 of maps
> with LocalSearch?
>
> Ilya

Reply all
Reply to author
Forward
0 new messages