Google geocoding & place details incomplete in Kosovo - google-maps-api-3

I've got multiple existing and reasonably specific addresses in Kosovo (e.g. https://goo.gl/maps/fryFyLm1Eg3M6jfB7) which google geocodes as partial matches:
// https://maps.googleapis.com/maps/api/geocode/json?address=Rr.D%C3%ABshmor%C3%ABt%20e%20Kombit,%20ferizaj+kosovo&key=...
{
"results": [
{
"address_components": [
{
"long_name": "Dëshmorët e Kombit",
"short_name": "Dëshmorët e Kombit",
"types": [
"route"
]
},
{
"long_name": "Ferizaj",
"short_name": "Ferizaj",
"types": [
"locality",
"political"
]
}
],
"formatted_address": "Dëshmorët e Kombit, Ferizaj",
"geometry": {
...
},
"partial_match": true,
"place_id": "ChIJxflVGlh-VBMRe2iYrxbiSzY",
"types": [
"route"
]
}
],
"status": "OK"
}
Lots of address components seem to be missing though (administrative_area_level_1, country_political =ISO country code, etc).
Fetching place details doesn't help:
// https://maps.googleapis.com/maps/api/place/details/json?fields=place_id,name,formatted_address,geometry,address_components&place_id=ChIJxflVGlh-VBMRe2iYrxbiSzY&key=...
{
"result": {
"address_components": [
{
"long_name": "Dëshmorët e Kombit",
"short_name": "Dëshmorët e Kombit",
"types": [
"route"
]
},
{
"long_name": "Ferizaj",
"short_name": "Ferizaj",
"types": [
"locality",
"political"
]
}
],
"formatted_address": "Dëshmorët e Kombit, Ferizaj",
"geometry": {
...
},
"name": "Dëshmorët e Kombit",
"place_id": "ChIJxflVGlh-VBMRe2iYrxbiSzY"
},
"status": "OK"
}
I suppose it's related to this google group thread on disputed territories from 2016 but do the limitations still apply?
Other geocoding providers (e.g. https://geocode.xyz/42.36566,21.15629?json=1) yield much more detailed results.
What are the latest recommendations on geocoding disputed terriotiries like Kosovo with google?

Related

Here Tour Planning API, facing issue on multiple pickup and multiple delivery on same shift

I am working with a fleet management system. I have a scenario that driver have to go multiple places to pickup and deliver the pickup product in multiple delivery location.
Here i have a scenario like that,
Order 1 - Pickup (P1 time range 10:00AM to 11:00 AM) 10 Product. it has 3 delivery point in different location in any time can be delivered with in shift (D1,D2,D3) all of the picked product will delivered in delivered location .
Order 2 - Pickup (P2 time range 11:00AM to 12:00 PM) 10 Product. it has 3 delivery point in different location in any time can be delivered with in shift (D4,D5,D6) all of the picked product will delivered in delivered location .
Order 3 - Pickup (P3 time range 10:30AM to 11:30 PM) 10 Product. it has 3 delivery point in different location in any time can be delivered with in shift (D7,D8,D9) all of the picked product will delivered in delivered location .
in above scenario we have a restriction that if pickup is not complete then we can't make the delivery of this order like if P1 is not complete then we can't complete D1,D2 or D3.
so our optimized list should be set priority wise. We are getting optimized stop but some time we are getting delivery stop is coming before pickup stop. so we want to prevent this things.
is there any instruction to do this using Here Tour Planning API.
VRP with Multi-Jobs
A multi-job as opposed to a simple job is a job that consists of multiple pickups and deliveries. The specific of such jobs is that they only can be considered as executed when all the tasks inside the job are done, otherwise, none of them will be executed. Also, the sum of demands for pickups and deliveries must be equal. A very common scenario for a multi-job problem could be executing multiple pickups at different locations followed by delivery to a single location.
We can imagine the multi-job VRP in real life as for example a daily routine of a school bus that has to pick up several children at different addresses and deliver them to school. As we can guess, taking the kids back to their homes from the school by the same school bus is a multi-job VRP as well.
Another example of multi-job VRP use in real life is the work of garbage collection companies when a vehicle has to execute several pickups and one delivery within the job (collect garbage from several locations in the city and deliver it to the dump location).
So let’s consider we have a multi-job with several pickups and one delivery in it. Let’s say we need to deliver 3 children to the local school from their specific address via the school bus. Regarding the vehicle, we need it to start and end the shift at one depo, that is at the same location. We specify the routine vehicle constraints like cost, distance, shift time, location, capacity and amount. Note that In the case of a school bus, for example, you may assume your capacity units as people/children.
{
"fleet": {
"types": [
{
"id": "b0130d2f754d",
"profile": "car_1",
"costs": {
"fixed": 5.0,
"distance": 0.007,
"time": 0.002
},
"shifts": [
{
"start": {
"time": "2021-08-27T08:03:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
},
"end": {
"time": "2021-08-27T16:03:00Z",
"location": {
"lat": 52.48693181589403,
"lng": 13.308748991045801
}
}
}
],
"capacity": [
20
],
"amount": 1
}
],
"profiles": [
{
"type": "car",
"name": "car_1"
}
]
},
Regarding the jobs, in this very case, you can set them depending on your needs. One way is to add all of your pickups as separate jobs and then add a delivery job. The other way is to use a multi-job. In this way, you may add a multi-job with all the pickups and one delivery at the end. Let's build a problem where we would have one multi-job with 3 pickups and 1 delivery to deliver all those pickups in one location.
Problem
{
"fleet": {
"types": [
{
"id": "b0130d2f754d",
"profile": "car_1",
"costs": {
"fixed": 5.0,
"distance": 0.007,
"time": 0.002
},
"shifts": [
{
"start": {
"time": "2021-08-27T08:03:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
},
"end": {
"time": "2021-08-27T16:03:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
}
}
],
"capacity": [
30
],
"amount": 1
}
],
"profiles": [
{
"type": "car",
"name": "car_1"
}
]
},
"plan": {
"jobs": [
{
"id": "job_1",
"tasks": {
"pickups": [
{
"places": [
{
"location": {
"lat": 52.47706593757918,
"lng": 13.390815701172201
},
"duration": 660,
"tag": "Address_1"
}
],
"demand": [
1
]
},
{
"places": [
{
"location": {
"lat": 52.473571009931106,
"lng": 13.389035169086807
},
"duration": 1140,
"tag": "Address_2"
}
],
"demand": [
1
]
},
{
"places": [
{
"location": {
"lat": 52.53090538774364,
"lng": 13.384692097156309
},
"duration": 840,
"tag": "Address_3"
}
],
"demand": [
1
]
}
],
"deliveries": [
{
"places": [
{
"location": {
"lat": 52.58919138279804,
"lng": 13.462161100698735
},
"duration": 1020,
"tag": "Address_4"
}
],
"demand": [
3
]
}
]
}
}
]
}
}
Solution
The solution for this problem will look as follows:
{
"statistic": {
"cost": 273.77500000000003,
"distance": 36041,
"duration": 8244,
"times": {
"driving": 4584,
"serving": 3660,
"waiting": 0,
"break": 0
}
},
"tours": [
{
"vehicleId": "b0130d2f754d_1",
"typeId": "b0130d2f754d",
"stops": [
{
"location": {
"lat": 52.530971,
"lng": 13.384915
},
"time": {
"arrival": "2021-08-27T08:03:00Z",
"departure": "2021-08-27T08:03:00Z"
},
"load": [
0
],
"activities": [
{
"jobId": "departure",
"type": "departure"
}
]
},
{
"location": {
"lat": 52.53090538774364,
"lng": 13.384692097156307
},
"time": {
"arrival": "2021-08-27T08:03:02Z",
"departure": "2021-08-27T08:17:02Z"
},
"load": [
1
],
"activities": [
{
"jobId": "job_1",
"type": "pickup",
"jobTag": "Address_3"
}
]
},
{
"location": {
"lat": 52.473571009931106,
"lng": 13.389035169086808
},
"time": {
"arrival": "2021-08-27T08:34:57Z",
"departure": "2021-08-27T08:53:57Z"
},
"load": [
2
],
"activities": [
{
"jobId": "job_1",
"type": "pickup",
"jobTag": "Address_2"
}
]
},
{
"location": {
"lat": 52.47706593757918,
"lng": 13.3908157011722
},
"time": {
"arrival": "2021-08-27T08:54:51Z",
"departure": "2021-08-27T09:05:51Z"
},
"load": [
3
],
"activities": [
{
"jobId": "job_1",
"type": "pickup",
"jobTag": "Address_1"
}
]
},
{
"location": {
"lat": 52.58919138279804,
"lng": 13.462161100698737
},
"time": {
"arrival": "2021-08-27T09:40:21Z",
"departure": "2021-08-27T09:57:21Z"
},
"load": [
0
],
"activities": [
{
"jobId": "job_1",
"type": "delivery",
"jobTag": "Address_4"
}
]
},
{
"location": {
"lat": 52.530971,
"lng": 13.384915
},
"time": {
"arrival": "2021-08-27T10:20:24Z",
"departure": "2021-08-27T10:20:24Z"
},
"load": [
0
],
"activities": [
{
"jobId": "arrival",
"type": "arrival"
}
]
}
],
"statistic": {
"cost": 273.77500000000003,
"distance": 36041,
"duration": 8244,
"times": {
"driving": 4584,
"serving": 3660,
"waiting": 0,
"break": 0
}
}
}
]
}
From this solution we can see that the vehicle starts its way from a depot, after that it executes 3 pickup and 1 delivery multi-job, and arrives back to the depot.
See also the documentation here

HERE Tour planning use vehicles multiples times

I am working my way into the Here Tour and have already done some planning. However, I am now dealing with a problem where more is to be transported than the vehicles can carry.
Problem
I want to transport 100 units to 10 points. I only have one vehicle with a capacity of 50, so I can't transport everything in one trip. The time and the distance that the vehicle travels are not limited.
I have already looked up what can be done with such a problem.
use more vehicles
use a bigger vehicle
define a second shift for the vehicle so that it drives twice.
I would like to implement it as in solution 3). The number and the vehicles should not be changed. The vehicle should drive more often. But since I don't know how long the first trip will take. I cannot say when the second shift should start.
Do you have an idea how to solve this best.
Using option#3 can easily solve the problem: In the problem file define 2 time shifts for the vehicle, add 10 delivery jobs with 24hs pf time window.
The solution will have all 10 jobs served by 1 vehicle.
For the example:
{
"fleet": {
"types": [
{
"id": "vehicle_1",
"profile": "car_1",
"costs": {
"fixed": 12.0,
"distance": 0.003,
"time": 0.008
},
"shifts": [
{
"start": {
"time": "2021-07-17T00:01:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
},
"end": {
"time": "2021-07-17T12:00:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
}
},
{
"start": {
"time": "2021-07-17T12:01:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
},
"end": {
"time": "2021-07-17T23:59:00Z",
"location": {
"lat": 52.530971,
"lng": 13.384915
}
}
}
],
"capacity": [
50
],
"limits": {
"maxDistance": 3000000,
"shiftTime": 86400
},
"amount": 1
}
],
"profiles": [
{
"type": "car",
"name": "car_1"
}
]
},
"plan": {
"jobs": [
{
"id": "job_1",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.400971,
"lng": 13.284915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_2",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.2346971,
"lng": 13.274915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_3",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.660971,
"lng": 13.314915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_4",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.244971,
"lng": 13.344915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_5",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.150971,
"lng": 13.214915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_6",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.430971,
"lng": 13.3454915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_7",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.2344971,
"lng": 13.224915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
}
,
{
"id": "job_8",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.330971,
"lng": 13.354915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_9",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.250971,
"lng": 13.316915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
},
{
"id": "job_10",
"tasks": {
"deliveries": [
{
"places": [
{
"times": [
[
"2021-07-17T00:01:00Z",
"2021-07-17T23:59:00Z"
]
],
"location": {
"lat": 52.420971,
"lng": 13.344915
},
"duration": 900
}
],
"demand": [
10
]
}
]
}
}
]
}
}

How to get the register device name from OKTA API

I have a requirement to display the OKTA register device name on the screen like the OKTA does for you.
In the picture above it display (Pixel 2 XL) where is the OKTA API to get the register device name
I am referring to OKTA dev API but didn't found anywhere
https://developer.okta.com/docs/reference/api/factors/
Any idea where can I find ???
Once you have the userid you can call the factors list API to get the enrolled MFA factors for the user.
Which will get you back a body like:
[
{
"id": "opffxq5v54xO5kdsa0x6",
"factorType": "push",
"provider": "OKTA",
"vendorName": "OKTA",
"status": "ACTIVE",
"created": "2020-05-07T20:49:49.000Z",
"lastUpdated": "2020-05-20T13:33:58.000Z",
"profile": {
"credentialId": "test#test.com",
"deviceType": "SmartPhone_Android",
"keys": [
{
"kty": "RSA",
"use": "sig",
"kid": "default",
"e": "AQAB",
"n": "j_rlzlG07lZy_TegQPjllleeaGxxDsrtFNaoQHhDowV1z54okXdDobyJo5B9rcCkP7-i0EniNdaCFDj8xugG7WSmcDRzr46AujT7nFVPI5Z7EZE9IaLdYLP0Hg0nRaC3qhHPdv8JGszle8t0Fej1eR-AqT1mrsNUM3-k44_Axj47xhAkIPoxCjyvvA8W1FWKQbECe_y-HtlcLksJlW03WDt_bCdKwx2uVqca1yiEIF3HwhHtpK1dfwosjyEvfpTtsUWtKJVsJiksLajDhu9dGN3JcOT9unsLbWcyWc-kfQ9_oiaMikZCvtbONGSgVjtBttc95-8CHMw-tpA4HCRlcw"
}
],
"name": "Pixel 4 XL",
"platform": "ANDROID",
"version": "29"
},
"_links": {
"self": {
"href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/opffxq5v54xO5kdsa0x6",
"hints": {
"allow": [
"GET",
"DELETE"
]
}
},
"verify": {
"href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/opffxq5v54xO5kdsa0x6/verify",
"hints": {
"allow": [
"POST"
]
}
},
"user": {
"href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6",
"hints": {
"allow": [
"GET"
]
}
}
}
},
{
"id": "ostgppjgvFiLfBv850x6",
"factorType": "token:software:totp",
"provider": "OKTA",
"vendorName": "OKTA",
"status": "ACTIVE",
"created": "2020-05-20T13:33:58.000Z",
"lastUpdated": "2020-05-20T13:33:58.000Z",
"profile": {
"credentialId": "test#test.com"
},
"_links": {
"self": {
"href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/ostgppjgvFiLfBv850x6",
"hints": {
"allow": [
"GET",
"DELETE"
]
}
},
"verify": {
"href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6/factors/ostgppjgvFiLfBv850x6/verify",
"hints": {
"allow": [
"POST"
]
}
},
"user": {
"href": "https://<yourtenant>.oktapreview.com/api/v1/users/00u9ivp5ft7EHNTRW0x6",
"hints": {
"allow": [
"GET"
]
}
}
}
}
]
The device information is shown under the factorProfile (profile.name) which is documented here but doesn't show an example of push.

OpenRefine reconciliation service not working - mutliple vs single queries

I have been using OpenRefine 2.6 Beta 1 w/o problems since its release, and later, with the reconciliation service at:
http://reconcile.freebaseapps.com/reconcile
However, in the past fee days, I have not been able to use it all. If I go to the URL:
http://reconcile.freebaseapps.com/
and type the multiple query:
{
"query": "Ford",
"type": "/people/person",
"properties": [
{
"pid": "/people/person/place_of_birth",
"v": "Detroit"
}
]
}
I obtain:
{
"result": [
{
"id": "/m/0j8pb6y",
"name": "Ford",
"type": [
{
"id": "/people/person",
"name": "Person"
},
{
"id": "/common/topic",
"name": "Topic"
},
{
"id": "/geography/mountaineer",
"name": "Mountaineer"
}
],
"notable": [],
"score": 1.1546246,
"match": false
},
{
"id": "/m/01vd3gv",
"name": "Ford",
"type": [
{
"id": "/common/topic",
"name": "Topic"
},
{
"id": "/music/artist",
"name": "Musical Artist"
}
],
"notable": [],
"score": 1.0330245999999998,
"match": false
},
{
"id": "/m/0cmdhzt",
"name": "James Meredith",
"type": [
{
"id": "/common/topic",
"name": "Topic"
},
{
"id": "/people/person",
"name": "Person"
},
{
"id": "/military/military_person",
"name": "Military Person"
},
{
"id": "/people/deceased_person",
"name": "Deceased Person"
}
],
"notable": [],
"score": 0.0681692,
"match": false
}
],
"duration": 369
}
But if I try a simple query:
{
"query": "Ford"
}
I get:
Status: error Error:undefined
Any insights into what's happening with the reconciliation service? Is there any other service I could use to replace freebaseapps.com?
Thanks
Try this in Queries Parameter at http://reconcile.freebaseapps.com/
{
"q0": {
"query": "Ford"
}
}
For some reason, single queries are not accepted in Query Parameter but in Queries Parameter in the format above. I have not tested this in OpenRefine, so you might have to modify it.
I don't know for certain about the date, but Freebase was announced earlier this year as being shutdown by Jun 30, 2015, for some services. Maybe service is intermittent until full shutdown? Sorry, this answer probably doesn't help much.

.NET DataContractJsonSerializer, Nested collections throwing me for a loop

I'm working on a class to get the Latitude and Longitude of an address by 3 different providers (just for comparison sake).
Note, this might look like a lot to look at, but some info is just there for reference if you want. Data below the <hr> is not necessary to look at.
My Google Maps DataContract works like a champ. But my Bing and MapQuest DataContracts aren't playing so nice. I think the issue has to deal with the Nested collections of the JSON for Bing and MapQuest, and I just don't know how to deal with them.
Here is the Function that processes the Data.
''# Because the JSON Response from Google, MapQuest, and Bing are drastically
''# different, we need to consume the response a little differently
''# for each API.
''# ##################################
''# BING IS BROKEN
''# ##################################
''# Here we're handling the Bing Provider
If Provider = apiProvider.Bing Then
Dim res = DirectCast(serializer.ReadObject(request.GetResponse().GetResponseStream()), BingResponse)
Dim resources As BingResponse.ResourceSet.Resource = res.resourceSets(0).resources(0)
Dim point = resources.point
With coordinates
.latitude = point.coordinates(0)
.longitude = point.coordinates(1)
End With
''# ##################################
''# GOOGLE WORKS LIKE A CHAMP
''# ##################################
''# Here we're handling the Google Provider
ElseIf Provider = apiProvider.Google Then
Dim res = DirectCast(serializer.ReadObject(request.GetResponse().GetResponseStream()), GoogleResponse)
Dim resources As GoogleResponse.Result = res.results(0)
Dim point = resources.geometry.location
With coordinates
.latitude = point.lat
.longitude = point.lng
End With
''# ##################################
''# MAPQUEST IS BROKEN
''# ##################################
''# Here we're handling the MapQuest Provider
ElseIf Provider = apiProvider.MapQuest Then
Dim res = DirectCast(serializer.ReadObject(request.GetResponse().GetResponseStream()), MapQuestResponse)
Dim resources As MapQuestResponse.Result = res.results(0)
Dim point = resources.locations.latLng
With coordinates
.latitude = point.lat
.longitude = point.lng
End With
End If
And here are the three DataContracts
''# A comment to fix SO Code Coloring
<DataContract()>
Public Class BingResponse
<DataMember()>
Public Property resourceSets() As ResourceSet()
<DataContract()>
Public Class ResourceSet
<DataMember()>
Public Property resources() As Resource()
<DataContract([Namespace]:="http://schemas.microsoft.com/search/local/ws/rest/v1", name:="Location")>
Public Class Resource
<DataMember()>
Public Property point() As m_Point
<DataContract()>
Public Class m_Point
<DataMember()>
Public Property coordinates() As String()
End Class
End Class
End Class
End Class
<DataContract()>
Public Class GoogleResponse
<DataMember()>
Public Property results() As Result()
<DataContract()>
Public Class Result
<DataMember()>
Public Property geometry As m_Geometry
<DataContract()>
Public Class m_Geometry
<DataMember()>
Public Property location As m_location
<DataContract()>
Public Class m_location
<DataMember()>
Public Property lat As String
<DataMember()>
Public Property lng As String
End Class
End Class
End Class
End Class
<DataContract()>
Public Class MapQuestResponse
<DataMember()>
Public Property results() As Result()
<DataContract()>
Public Class Result
<DataMember()>
Public Property locations As m_Locations
<DataContract()>
Public Class m_Locations
<DataMember()>
Public Property latLng As m_latLng
<DataContract()>
Public Class m_latLng
<DataMember()>
Public Property lat As String
<DataMember()>
Public Property lng As String
End Class
End Class
End Class
End Class
When testing MapQuest I get this error
System.NullReferenceException: Object reference not set to an instance of an object.
on line
.latitude = point.lat
When testing Bing I get this error
System.IndexOutOfRangeException: Index was outside the bounds of the array.
on line
Dim resources As BingResponse.ResourceSet.Resource = res.resourceSets(0).resources(0)
FYI, I'll also post what the JSON Response for each looks like.
Google Maps
{
"status": "OK",
"results": [ {
"types": [ "bus_station", "transit_station" ],
"formatted_address": "Microsoft Way & Microsoft ACS, Redmond, WA 98052, USA",
"address_components": [ {
"long_name": "Microsoft Way & Microsoft ACS",
"short_name": "Microsoft Way & Microsoft ACS",
"types": [ "bus_station", "transit_station" ]
}, {
"long_name": "Redmond",
"short_name": "Redmond",
"types": [ "locality", "political" ]
}, {
"long_name": "East Seattle",
"short_name": "East Seattle",
"types": [ "administrative_area_level_3", "political" ]
}, {
"long_name": "King",
"short_name": "King",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Washington",
"short_name": "WA",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "United States",
"short_name": "US",
"types": [ "country", "political" ]
}, {
"long_name": "98052",
"short_name": "98052",
"types": [ "postal_code" ]
} ],
"geometry": {
"location": {
"lat": 47.6397018,
"lng": -122.1305080
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 47.6365542,
"lng": -122.1336556
},
"northeast": {
"lat": 47.6428494,
"lng": -122.1273604
}
}
},
"partial_match": true
}, {
"types": [ "bus_station", "transit_station" ],
"formatted_address": "Microsoft Way & NE 36th St, Redmond, WA 98052, USA",
"address_components": [ {
"long_name": "Microsoft Way & NE 36th St",
"short_name": "Microsoft Way & NE 36th St",
"types": [ "bus_station", "transit_station" ]
}, {
"long_name": "Redmond",
"short_name": "Redmond",
"types": [ "locality", "political" ]
}, {
"long_name": "East Seattle",
"short_name": "East Seattle",
"types": [ "administrative_area_level_3", "political" ]
}, {
"long_name": "King",
"short_name": "King",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Washington",
"short_name": "WA",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "United States",
"short_name": "US",
"types": [ "country", "political" ]
}, {
"long_name": "98052",
"short_name": "98052",
"types": [ "postal_code" ]
} ],
"geometry": {
"location": {
"lat": 47.6420593,
"lng": -122.1306990
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 47.6389117,
"lng": -122.1338466
},
"northeast": {
"lat": 47.6452069,
"lng": -122.1275514
}
}
},
"partial_match": true
}, {
"types": [ "bus_station", "transit_station" ],
"formatted_address": "Microsoft Way & NE 31ST St, Redmond, WA 98052, USA",
"address_components": [ {
"long_name": "Microsoft Way & NE 31ST St",
"short_name": "Microsoft Way & NE 31ST St",
"types": [ "bus_station", "transit_station" ]
}, {
"long_name": "Redmond",
"short_name": "Redmond",
"types": [ "locality", "political" ]
}, {
"long_name": "East Seattle",
"short_name": "East Seattle",
"types": [ "administrative_area_level_3", "political" ]
}, {
"long_name": "King",
"short_name": "King",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Washington",
"short_name": "WA",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "United States",
"short_name": "US",
"types": [ "country", "political" ]
}, {
"long_name": "98052",
"short_name": "98052",
"types": [ "postal_code" ]
} ],
"geometry": {
"location": {
"lat": 47.6380959,
"lng": -122.1318050
},
"location_type": "APPROXIMATE",
"viewport": {
"southwest": {
"lat": 47.6349483,
"lng": -122.1349526
},
"northeast": {
"lat": 47.6412435,
"lng": -122.1286574
}
}
},
"partial_match": true
}, {
"types": [ "route" ],
"formatted_address": "Microsoft w Campus Acrd, Redmond, WA, USA",
"address_components": [ {
"long_name": "Microsoft w Campus Acrd",
"short_name": "Microsoft w Campus Acrd",
"types": [ "route" ]
}, {
"long_name": "Redmond",
"short_name": "Redmond",
"types": [ "locality", "political" ]
}, {
"long_name": "East Seattle",
"short_name": "East Seattle",
"types": [ "administrative_area_level_3", "political" ]
}, {
"long_name": "King",
"short_name": "King",
"types": [ "administrative_area_level_2", "political" ]
}, {
"long_name": "Washington",
"short_name": "WA",
"types": [ "administrative_area_level_1", "political" ]
}, {
"long_name": "United States",
"short_name": "US",
"types": [ "country", "political" ]
} ],
"geometry": {
"location": {
"lat": 47.6582970,
"lng": -122.1414390
},
"location_type": "GEOMETRIC_CENTER",
"viewport": {
"southwest": {
"lat": 47.6559394,
"lng": -122.1435435
},
"northeast": {
"lat": 47.6622346,
"lng": -122.1372482
}
},
"bounds": {
"southwest": {
"lat": 47.6577719,
"lng": -122.1433446
},
"northeast": {
"lat": 47.6604021,
"lng": -122.1374471
}
}
},
"partial_match": true
} ]
}
Bing Maps
{ "authenticationResultCode" : "ValidCredentials",
"brandLogoUri" : "http://dev.virtualearth.net/Branding/logo_powered_by.png",
"copyright" : "Copyright © 2011 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
"resourceSets" : [ { "estimatedTotal" : 1,
"resources" : [ { "__type" : "Location:http://schemas.microsoft.com/search/local/ws/rest/v1",
"address" : { "addressLine" : "1 Microsoft Way",
"adminDistrict" : "WA",
"countryRegion" : "United States",
"formattedAddress" : "1 Microsoft Way, Redmond, WA 98052",
"locality" : "Redmond",
"postalCode" : "98052"
},
"bbox" : [ 47.636682837606166,
-122.13698544771381,
47.644408272747519,
-122.12169881991093
],
"confidence" : "High",
"entityType" : "Address",
"name" : "1 Microsoft Way, Redmond, WA 98052",
"point" : { "coordinates" : [ 47.640545555176843,
-122.12934213381237
],
"type" : "Point"
}
} ]
} ],
"statusCode" : 200,
"statusDescription" : "OK",
"traceId" : "3d0dd6c4ea1f4c4ba6f9c7211a5abf75|BAYM001222|02.00.82.2800|BY2MSNVM001058"
}
MapQuest
{ "info" : { "copyright" : { "imageAltText" : "© 2011 MapQuest, Inc.",
"imageUrl" : "http://tile21.mqcdn.com/res/mqlogo.gif",
"text" : "© 2011 MapQuest, Inc."
},
"messages" : [ ],
"statuscode" : 0
},
"options" : { "ignoreLatLngInput" : false,
"maxResults" : -1,
"thumbMaps" : true
},
"results" : [ { "locations" : [ { "adminArea1" : "US",
"adminArea1Type" : "Country",
"adminArea3" : "WA",
"adminArea3Type" : "State",
"adminArea4" : "King County",
"adminArea4Type" : "County",
"adminArea5" : "Redmond",
"adminArea5Type" : "City",
"displayLatLng" : { "lat" : 47.674197999999997,
"lng" : -122.1203
},
"dragPoint" : false,
"geocodeQuality" : "CITY",
"geocodeQualityCode" : "A5XCX",
"latLng" : { "lat" : 47.674197999999997,
"lng" : -122.1203
},
"linkId" : 0,
"mapUrl" : "http://www.mapquestapi.com/staticmap/v3/getmap?type=map&size=225,160&pois=purple-1,47.674198,-122.1203,0,0|&center=47.674198,-122.1203&zoom=9&key=Fmjtd|luu22q01ng,2n=o5-h6rnq&rand=-47567557",
"postalCode" : "",
"sideOfStreet" : "N",
"street" : "",
"type" : "s"
} ],
"providedLocation" : { "location" : "1 Microsoft Way, Redmon WA" }
} ]
}
Addition
For map quest:
Shouldn't Public Property locations As m_Locations be Public Property locations() As m_Locations()? I assume this is array notation in VB. It would seem you're taking the latLng from the Array object and not the instance of the location in the array.
Found a similar question with a data contract (accepted answer) for the same response. Looking for differences but not spotting them yet...

Resources