Mike,
I tried removing the lines you've told me, the map was not loaded.
I looked at Error console from Firefox, it said "c is undefined"
It seems that I have to give MapCenter and ZoomLevel everytime before
requesting KML, which I don't know these values.


On Nov 20, 6:14 pm, Mike Williams <[email protected]> wrote:
> Wasn't it Woodyz who wrote:
>
> >Hi,
>
> >Can anyone help me look at my webpage? I am very new to Javascript.
> >I want my script to remember last MapCenter, ZoomLevel and MapType,
> >then anytime when user select new KML overlay from listbox, the map
> >will show new KML overlay without moving and don't change ZoomLevel
> >and MapType.
>
> >My webpage has two listboxes to show Map, here it is;
> >http://www.wap.ait.ac.th/slr/test.html
>
> >Thank you in advance
>
> Have you tried removing the lines on which you change the map centre and
> zoom level after requesting the KML?
>
>         if (s_a == "1"){
>         //map.setCenter(coThai, 6);
>         map.setCenter(new GLatLng(curLat, curLng), 6);
>         } else if (s_a == "2") {
>         map.setCenter(coBKK, 10);
>         } else if (s_a == "3") {
>         map.setCenter(coCentral, 8);
>         } else if (s_a == "4") {
>         map.setCenter(coEast, 8);
>         } else if (s_a == "5") {
>         map.setCenter(coSouth, 7);
>         }
>
> Hint: You only need one copy of each GControl, GoogleBar and
> GClientGeocoder, so your page will be more efficient if you don't do
> this each time you call SLevel() or SArea()
>
>         map.addControl(new GMapTypeControl());
>         map.addControl(new GLargeMapControl());
>         map.setUIToDefault();
>         map.enableGoogleBar();
>         geocoder = new GClientGeocoder();
>
> --
> Mike Williamshttp://econym.org.uk/gmap

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=.


Reply via email to