I'm executing the code below to fetch the current position of the user. It works dandy but I'm only getting the "flat" information - altitude and longitude - while altitude is null. Can that be remedied and, if so, how?
var geolocationProvider = new Microsoft.Maps
.GeoLocationProvider(map).getCurrentPosition({
successCallback: function(data) {
var latitude = data.position.coords.latitude;
var longitude = data.position.coords.longitude;
var altitude = data.position.coords.altitude;
} ...
});
Please note that I'm looking for a solution based on JavaSCript calls (currently avoiding RESTing and WCFing). Might the issue be coming up because of:
a. problems with my code (bug or syntax getting data)
b. problems at the particular locations (spots with no data)
c. lack of altitude data on Bing Maps (no data at MS at all)
d. insufficient rights for my account (no data for my license)
e. wrong platform applied (no data for JS control approach)
f. other?
When I F12 the thing I see this.
data.position.coords
Coordinates {speed: null, heading: null, altitudeAccuracy: null, accuracy: 34, altitude: null…} accuracy: 34
altitude: null
altitudeAccuracy: null
heading: null
latitude: 59.333358800000006
longitude: 18.0567974
speed: null
__proto__: Coordinates