GWT+GMaps




Lately, I have been working on Google maps and it seems that it so hard working on the auto re-size thing when dealing with GWT(Google Web Toolkit).

Fortunately, things get better after three days of search for the right solution. Here's the sample code in case you're working with the maps too.

MapPanel google = new GoogleMap()

google.setCenterAndZoom(new LatLonPoint(21, 106), 5); google.setWidth("100%");
google.setHeight(Window.getClientHeight() + "px"); google.addLargeControls();

//auto resize the map


Window.addWindowResizeListener(new WindowResizeListener(){


public void onWindowResized(int width, int height) {
google.setHeight(height + "px");

}

});

google.addLargeControls();


Unfortunately, the rendering part of the map still has some major issues.

Comments

Popular posts from this blog

Apple's Edge Over Microsoft?

High Grounds Cafe - Best Internet Cafe in the Philippines

GWT+MySQL Best Practice