PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are creating a North American reverse geocoding application by using the Microsoft MapPoint Web Service. The application must convert the latitude and longitude coordinates of a point on the map into a string that contains the city, province/state, and country. You need to obtain the string in the following format: “city, province/state, country”. Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
GetInfoOptions getInfoOptions = new GetInfoOptions(); getInfoOptions.IncludeAddresses = true; getInfoOptions.IncludeAllEntityTypes = true; Location[] locations = findService.GetLocationInfo(origin, “MapPoint.NA”, getInfoOptions) string address = locations[0].Entity.DisplayName;

B.
GetInfoOptions getInfoOptions = new GetInfoOptions(); getInfoOptions.IncludeAddresses = false; getInfoOptions.IncludeAllEntityTypes = false; getInfoOptions.EntityTypesToReturn = new string[] { “PopulatedPlace” }; Location[] locations = findService.GetLocationInfo(origin, “MapPoint.NA”, getInfoOptions); string address = locations[0].Entity.DisplayName;

C.
GetInfoOptions getInfoOptions = new GetInfoOptions(); getInfoOptions.IncludeAddresses = true; getInfoOptions.IncludeAllEntityTypes = false; getInfoOptions.EntityTypesToReturn = new string[] { “PopulatedPlace” }; Location[] locations = findService.GetLocationInfo(origin, “MapPoint.NA”, getInfoOptions); string address = locations[0].Entity.DisplayName;

D.
GetInfoOptions getInfoOptions = new GetInfoOptions(); getInfoOptions.IncludeAddresses = true; getInfoOptions.IncludeAllEntityTypes = false; getInfoOptions.EntityTypesToReturn = new string[] { “AdminDivision1” }; Location[] locations = findService.GetLocationInfo(origin, “MapPoint.NA”, getInfoOptions) string address = locations[0].Entity.DisplayName;


Leave a Reply