Thursday, September 15, 2011

Height Percentage issue with Google Maps

If you try to use style="width:100%;height:100%" on your map div, you get a map div that has zero height. That's because the div tries to be a percentage of the size of the , but by default the has an indeterminate height.
There are ways to determine the height of the screen and use that number of pixels as the height of the map div, but a simple alternative is to change the so that its height is 100% of the page. We can do this by applying style="height:100%" to both the and the . (We have to do it to both, otherwise the tries to be 100% of the height of the document, and the default for that is an indeterminate height.

The also has a margin by default. If you want to switch that off, add "margin:0" to the style, to push the body right out to the edge of the screen.

Reference : http://econym.org.uk/gmap/basic19.htm

Monday, May 2, 2011

Getting Current URL from UIWebView

To get the current URL string from a UIWebView object.

NSString *currentURL = UIWebViewID.request.URL.absoluteString;