gmaps-api-net (github) {
"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJRVY_etDX3IARGYLVpoq7f68",
"types" : [
"bus_station",
"transit_station",
"point_of_interest",
"establishment"
]
},
{
"geocoder_status" : "OK",
"partial_match" : true,
"place_id" : "ChIJp2Mn4E2-woARQS2FILlxUzk",
"types" : [ "route" ]
}
],
"routes" : [
{
"bounds" : {
"northeast" : {
"lat" : 34.1330949,
"lng" : -117.9143879
},
"southwest" : {
"lat" : 33.8068768,
"lng" : -118.3527671
}
},
"copyrights" : "Map data ©2016 Google",
"legs" : [
{
"distance" : {
"text" : "35.9 mi",
"value" : 57824
},
"duration" : {
"text" : "51 mins",
"value" : 3062
},
"end_address" : "Universal Studios Blvd, Los Angeles, CA 90068, USA",
"end_location" : {
"lat" : 34.1330949,
"lng" : -118.3524442
},
"start_address" : "Disneyland (Harbor Blvd.), S Harbor Blvd, Anaheim, CA 92802, USA",
"start_location" : {
"lat" : 33.8098177,
"lng" : -117.9154353
},
... Additional results truncated in this example[] ...
"overview_polyline" : {
"points" : "knjmEnjunUb[email protected]]@[email protected]@[email protected]@[email protected][email protected]@[email protected]`@[email protected]`[email protected]{YlZiBdBaIhGkFrDeCtBuFxFmIdJmOjPaChDeBlDiAdD}ApGcDxU}@hEmAxD}[[email protected]\\yBdEqFnJqB~DeFxMgK~VsMr[uKzVoCxEsEtG}[email protected]][email protected]{[email protected]`CwBfHaEzJuBdEyEhIaBnCiF|K_Oz\\
{MdZwAbDaKbUiB|CgCnDkDbEiE|[email protected]|[email protected]|[email protected][email protected]\\`[email protected]`@}F`MqK`PeGzIyGfJiG~GeLhLgIpIcE~FsDrHcFfLqDzH{CxEwAbBgC|B}F|DiQzKsbBdeA{[email protected]~\\[email protected]^wJfOySx[[email protected]_EvAiFpCaC|AqGpEwHzFoQnQoTrTqBlCyDnGmCfEmDpDyGzGsIzHuZzYwBpBsC`CqBlAsBbAqCxAoBrAqDdDcNfMgHbHiPtReBtCkD|GqAhBwBzBsG~FoAhAaCbDeBvD_BlEyM``@uBvKiA~DmAlCkA|B}@lBcChHoJnXcB`GoAnIS~CIjFDd]A|QMlD{@jH[[email protected]`[email protected]~HeMx^eDtJ}BnG{DhJU`@[email protected]@[email protected]{[email protected]@kBSsEW{GV}[email protected]?
[email protected]@mE`BsH|[email protected]}[email protected]@[email protected]][email protected]@[email protected][email protected]`DoBxDaHvM_FzImDzFeCpDeC|CkExDiJrHcBtAkDpDwObVuCpFeCdHoIl\\uBjIuClJsEvMyDbMqAhEoDlJ{C|J}FlZuBfLyDlXwB~QkArG_AnDiAxC{G|OgEdLaE`LkBbEwG~KgHnLoEjGgDxCaC`BuJdFkFtCgCnBuClD_HdMqEzHcBpB_C|BuEzCmPlIuE|[email protected]@|[email protected]_AlC{AxCcL`U{GvM_DjFkBzBsB`[email protected]@[email protected]|BcFjC}DbEuD~D`@[email protected]@[email protected]@}@vAgCbEaHfMqA`[email protected]@bAO`@[email protected]@W"
},
"summary" : "I-5 N and US-101 N",
"warnings" : [],
"waypoint_order" : []
}
],
"status" : "OK"
}
2. (Directions API itibaren) şuna benzer ... ya kullanacaktır
Bir JSON yanıtı bir sunmaktadır
string url = @"https://maps.googleapis.com/maps/api/directions/json?origin=75+9th+Ave+New+York,+NY&destination=MetLife+Stadium+1+MetLife+Stadium+Dr+East+Rutherford,+NJ+07073&key=YOUR_API_KEY"; WebRequest request = WebRequest.Create(url); WebResponse response = request.GetResponse(); Stream data = response.GetResponseStream(); StreamReader reader = new StreamReader(data); // json-formatted string from maps api string responseFromServer = reader.ReadToEnd(); response.Close();
Google Haritalar için API arayüzü. Nuget ile alabilirsiniz. Test etmedim, ama kullanması kolay görünüyor.
StackOverflow'a Hoş Geldiniz! Sorularımızda ve cevaplarımızda bazı gerçek kodlarımız var. Bu sorunun olduğu gibi kapalı olması muhtemeldir. Gelecekte başka soru sormaktan vazgeçmesine izin verme. – Marijn