Sending request on intialise.

7 views
Skip to first unread message

in...@howlingdollhouse.com

unread,
Dec 5, 2011, 6:39:54 PM12/5/11
to google-map...@googlegroups.com
Hi guys,

I have this website here; http://www.18andup.com.au/test_site/newSouth/stores/map.html and I'm having a small problem with it.

Basically, when you type in a query into the search field and press 'submit' it returns results (eg if you type in 'Sydney', nodes will appear), I just need to know how to make it so the site automatically sends a request when it loads, so when the maps starts it displays results for Sydney straight away.

Anyone have any ideas?

Andrew Leach

unread,
Dec 5, 2011, 6:53:15 PM12/5/11
to google-map...@googlegroups.com
On 5 December 2011 23:39, in...@howlingdollhouse.com

<in...@howlingdollhouse.com> wrote:
>
> Basically, when you type in a query into the search field and press 'submit'
> it returns results (eg if you type in 'Sydney', nodes will appear), I just
> need to know how to make it so the site automatically sends a request when
> it loads, so when the maps starts it displays results for Sydney straight
> away.
>
> Anyone have any ideas?

In your load() function, add a search for Syndey:
searchLocationsNear(new GLatLng(-33.873651,151.206890));

You may have to set the zoom explicitly.

By the way, you're using Version 2 of the API, which (a) is
deprecated; (b) has its own Group at
http://groups.google.com/group/Google-Maps-API/topics

Reply all
Reply to author
Forward
0 new messages