Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

VB.NET UWP/WinRT Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Bitfinex v2 REST
Bluzone
BrickLink
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
Jira
Lightspeed
MYOB
Magento
Mailgun
Mastercard

MedTunnel
MercadoLibre
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
Trello
Twilio
Twitter
UniPin
VoiceBase
Vonage
Walmart
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yousign
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(VB.NET UWP/WinRT) Azure Maps Get Search Address

Get information for a given address.

For more information, see https://docs.microsoft.com/en-us/rest/api/maps/search/getsearchaddress

Chilkat Universal Windows Platform (UWP) / WinRT Downloads

Chilkat for the Universal Windows Platform (UWP)

' This example requires the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

Dim http As New Chilkat.Http



http.Accept = "application/json"

Dim url As String = "https://atlas.microsoft.com/search/address/{$format}?subscription-key=[subscription-key]&api-version=1.0&query={$query}"

http.SetUrlVar("format","json")
http.SetUrlVar("query","15127 NE 24th Street, Redmond, WA 98052")


Dim strResp As String = Await http.QuickGetStrAsync(url)
If (http.LastMethodSuccess <> True) Then
    Debug.WriteLine(http.LastErrorText)
    Exit Sub
End If


Debug.WriteLine("Response Status Code: " & http.LastStatus)

Dim jsonResponse As New Chilkat.JsonObject
jsonResponse.Load(strResp)
jsonResponse.EmitCompact = False
Debug.WriteLine(jsonResponse.Emit())

If (http.LastStatus <> 200) Then
    Debug.WriteLine("Failed.")
    Exit Sub
End If


' Sample output...
' (See the parsing code below..)
' 
' Use this online tool to generate parsing code from sample JSON: 
' Generate Parsing Code from JSON


' {
'   "summary": {
'     "query": "15127 NE 24th Street, Redmond, WA 98052",
'     "queryType": "NON_NEAR",
'     "queryTime": 58,
'     "numResults": 1,
'     "offset": 0,
'     "totalResults": 1,
'     "fuzzyLevel": 1
'   },
'   "results": [
'     {
'       "type": "Point Address",
'       "id": "US/PAD/p0/19173426",
'       "score": 14.51,
'       "address": {
'         "streetNumber": "15127",
'         "streetName": "NE 24th St",
'         "municipalitySubdivision": "Redmond",
'         "municipality": "Redmond, Adelaide, Ames Lake, Avondale, Earlmount",
'         "countrySecondarySubdivision": "King",
'         "countryTertiarySubdivision": "Seattle East",
'         "countrySubdivision": "WA",
'         "postalCode": "98052",
'         "extendedPostalCode": "980525544",
'         "countryCode": "US",
'         "country": "United States Of America",
'         "countryCodeISO3": "USA",
'         "freeformAddress": "15127 NE 24th St, Redmond, WA 980525544",
'         "countrySubdivisionName": "Washington"
'       },
'       "position": {
'         "lat": 47.6308,
'         "lon": -122.1385
'       },
'       "viewport": {
'         "topLeftPoint": {
'           "lat": 47.6317,
'           "lon": -122.13983
'         },
'         "btmRightPoint": {
'           "lat": 47.6299,
'           "lon": -122.13717
'         }
'       },
'       "entryPoints": [
'         {
'           "type": "main",
'           "position": {
'             "lat": 47.6315,
'             "lon": -122.13852
'           }
'         }
'       ]
'     }
'   ]
' }
' 

Dim summaryQuery As String
Dim summaryQueryType As String
Dim summaryQueryTime As Integer
Dim summaryNumResults As Integer
Dim summaryOffset As Integer
Dim summaryTotalResults As Integer
Dim summaryFuzzyLevel As Integer
Dim i As Integer
Dim count_i As Integer
Dim v_type As String
Dim id As String
Dim score As String
Dim addressStreetNumber As String
Dim addressStreetName As String
Dim addressMunicipalitySubdivision As String
Dim addressMunicipality As String
Dim addressCountrySecondarySubdivision As String
Dim addressCountryTertiarySubdivision As String
Dim addressCountrySubdivision As String
Dim addressPostalCode As String
Dim addressExtendedPostalCode As String
Dim addressCountryCode As String
Dim addressCountry As String
Dim addressCountryCodeISO3 As String
Dim addressFreeformAddress As String
Dim addressCountrySubdivisionName As String
Dim positionLat As String
Dim positionLon As String
Dim viewportTopLeftPointLat As String
Dim viewportTopLeftPointLon As String
Dim viewportBtmRightPointLat As String
Dim viewportBtmRightPointLon As String
Dim j As Integer
Dim count_j As Integer

summaryQuery = jsonResponse.StringOf("summary.query")
summaryQueryType = jsonResponse.StringOf("summary.queryType")
summaryQueryTime = jsonResponse.IntOf("summary.queryTime")
summaryNumResults = jsonResponse.IntOf("summary.numResults")
summaryOffset = jsonResponse.IntOf("summary.offset")
summaryTotalResults = jsonResponse.IntOf("summary.totalResults")
summaryFuzzyLevel = jsonResponse.IntOf("summary.fuzzyLevel")
i = 0
count_i = jsonResponse.SizeOfArray("results")
While i < count_i
    jsonResponse.I = i
    v_type = jsonResponse.StringOf("results[i].type")
    id = jsonResponse.StringOf("results[i].id")
    score = jsonResponse.StringOf("results[i].score")
    addressStreetNumber = jsonResponse.StringOf("results[i].address.streetNumber")
    addressStreetName = jsonResponse.StringOf("results[i].address.streetName")
    addressMunicipalitySubdivision = jsonResponse.StringOf("results[i].address.municipalitySubdivision")
    addressMunicipality = jsonResponse.StringOf("results[i].address.municipality")
    addressCountrySecondarySubdivision = jsonResponse.StringOf("results[i].address.countrySecondarySubdivision")
    addressCountryTertiarySubdivision = jsonResponse.StringOf("results[i].address.countryTertiarySubdivision")
    addressCountrySubdivision = jsonResponse.StringOf("results[i].address.countrySubdivision")
    addressPostalCode = jsonResponse.StringOf("results[i].address.postalCode")
    addressExtendedPostalCode = jsonResponse.StringOf("results[i].address.extendedPostalCode")
    addressCountryCode = jsonResponse.StringOf("results[i].address.countryCode")
    addressCountry = jsonResponse.StringOf("results[i].address.country")
    addressCountryCodeISO3 = jsonResponse.StringOf("results[i].address.countryCodeISO3")
    addressFreeformAddress = jsonResponse.StringOf("results[i].address.freeformAddress")
    addressCountrySubdivisionName = jsonResponse.StringOf("results[i].address.countrySubdivisionName")
    positionLat = jsonResponse.StringOf("results[i].position.lat")
    positionLon = jsonResponse.StringOf("results[i].position.lon")
    viewportTopLeftPointLat = jsonResponse.StringOf("results[i].viewport.topLeftPoint.lat")
    viewportTopLeftPointLon = jsonResponse.StringOf("results[i].viewport.topLeftPoint.lon")
    viewportBtmRightPointLat = jsonResponse.StringOf("results[i].viewport.btmRightPoint.lat")
    viewportBtmRightPointLon = jsonResponse.StringOf("results[i].viewport.btmRightPoint.lon")
    j = 0
    count_j = jsonResponse.SizeOfArray("results[i].entryPoints")
    While j < count_j
        jsonResponse.J = j
        v_type = jsonResponse.StringOf("results[i].entryPoints[j].type")
        positionLat = jsonResponse.StringOf("results[i].entryPoints[j].position.lat")
        positionLon = jsonResponse.StringOf("results[i].entryPoints[j].position.lon")
        j = j + 1
    End While
    i = i + 1
End While

 

© 2000-2022 Chilkat Software, Inc. All Rights Reserved.