I noticed that in FF4 i can use geolocalisation object
position.address.postalCode to find the postalCode.
When testing on FF10 I noticed that position.address is always null, while I can still use position.coords without any problem to find longitude or latitude.
Can someone please tell me if there is simple way to find out postalCode in FF10 with position object?
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(findClosestAgencies);
}
function findClosestAgencies(position) {
alert("postalCode:" + position.address.postalCode);
alert("latitude:" + position.coords.latitude);
}
my code:
Thank you
According to the spec:
http://dev.w3.org/geo/api/spec-source.html#position_interface
Position is only required to have coordinates and timestamp. FF4 may have had some additional data, but its not guaranteed to be there since its not part of the spec. Try using the coordinates with an address finding service.