Format of the HTTP-Response

schimanski

Well-Known Member
Licensed User
Longtime User
I have started an HTML-Request to a webservice with the following code:

B4X:
  HttpClient1.Execute(request, 1)
End Sub
...
Sub HttpClient1_ResponseSuccess (Response As HttpResponse, TaskId As Int)
  result=Response.GetString("UTF8")
  Msgbox(result,"")
End Sub

The solution is this:

B4X:
<?xml version="1.0" encoding="UTF-8" ?> 
- <kml xmlns="http://earth.google.com/kml/2.0">
- <Response>
  <name>51.000000,6.000000</name> 
- <Status>
  <code>200</code> 
  <request>geocode</request> 
  </Status>
- <Placemark id="p1">
  <address>Pastor-Fischenich-Straße 19, 52538 Gangelt, Deutschland</address> 
- <AddressDetails Accuracy="8" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
- <Country>
  <CountryNameCode>DE</CountryNameCode> 
  <CountryName>Deutschland</CountryName> 
- <AdministrativeArea>
  <AdministrativeAreaName>Nordrhein-Westfalen</AdministrativeAreaName> 
- <SubAdministrativeArea>
  <SubAdministrativeAreaName>Heinsberg</SubAdministrativeAreaName> 
- <Locality>
  <LocalityName>Gangelt</LocalityName> 
- <DependentLocality>
  <DependentLocalityName>Gangelt</DependentLocalityName> 
- <Thoroughfare>
  <ThoroughfareName>Pastor-Fischenich-Straße 19</ThoroughfareName> 
  </Thoroughfare>
- <PostalCode>
  <PostalCodeNumber>52538</PostalCodeNumber> 
  </PostalCode>
  </DependentLocality>
  </Locality>
...
...

How can I read the response in a usefull format to use the informations?

thanks for help.....
 

alfcen

Well-Known Member
Licensed User
Longtime User
Hi shimanski,
Pease spare me the googling and let me know the URL of that webservice.
Looks like it finds an address closest to the coordinates provided.
Thanks, Robert
 
Upvote 0

alfcen

Well-Known Member
Licensed User
Longtime User
Thanks a lot, shimanski,

Both provide fine details for locations even in Okinawa, while Google adds addresses in Japanese characters, so the latter might be the better choice.

Best success with your Tilemap Viewer!
 
Upvote 0
Top