Geolocation is a HTML 5.0 API , supported on IPhone, Chrome and Firefox. Does have a delay, the XML file is faster.
Use is prompted before location is revealed.
Information about Geolocation api - position object.