hasan's blog (বল্গ)

work for fun!!!

Archive for April 2007

Firefox 1.5 with ajax sync request.

with one comment

This post is to remind myself about a bug on Firefox 1.5.

bug details:

Http ajax request doesn’t invoke “onstatechange” handler if ajax request type is set to sync.

how to resolve this problem:

invoke “onstatechange” function manually.

Written by nhm tanveer hossain khan

April 26, 2007 at 2:15 am

Google map: map.setCenter(latLng, zoomLevel)

with 2 comments

Recently i am playing with Google map. it is really fun. i am thinking i will share my experience through my blog.

problem: i want to set a center point
answer: you can use map.setCenter(new GLatLng(35.746512259918504,-42.1875), 2);
here 35.xxx is lat, -42.xx is lng  and 2 is zoom level.

how to use:

1. you can use “setCenter” when you instantiating an map object. for example:
var map = new GMap2(…);
map.setCenter(..);

2. you can use after completing your initial process. for example:
setCenter after loading marker from GDowloadUrl.

best of luck :)

Written by nhm tanveer hossain khan

April 12, 2007 at 12:12 pm