How to separate address data [Location Plugin]

How to separate address data after get location by Location Plugin

example.

121 khaosan Rd, Khet Dindaeng, Krung thep, 10400  to : 

121

khaosan Rd

Khet Dindaeng

Krungtep

10400  

or 

232 Asok-Din Daeng Rd, Khwaeng Bangkapi, Khet Huai Kwang, Krung Thep Maha Nakhon 10310, Thailand to :

232 

Asok-Din Daeng Rd

Khwaeng Bangkapi

Khet Huai Kwang

Krung Thep Maha Nakhon

10310

Thailand

Solution

Hi PS, 

You can use the Split function. But as your split is not based only on a separator, like the comma, if you use comma as separator you will end up with the numbers attached to part of the address, instead of separated. 

In this case you will have to stablish a function that check each string and on finding words that are numbers, extract them. 

Cheers

Solution

Eduardo Jauch wrote:

Hi PS, 

You can use the Split function. But as your split is not based only on a separator, like the comma, if you use comma as separator you will end up with the numbers attached to part of the address, instead of separated. 

In this case you will have to stablish a function that check each string and on finding words that are numbers, extract them. 

Cheers

Many Thanks. Eduardo Jauch I'll try this way.

Can I ask another question?

The address sometimes return my language but sometimes in English. Could you tell me how to return only my language ?


Many Thanks.

P.


In the same device? 

Eduardo Jauch wrote:

In the same device? 

yes.


What are you using to actually retrieve the address from the current location coordinates? Google api? 

Eduardo Jauch wrote:

What are you using to actually retrieve the address from the current location coordinates? Google api? 

Location Plugin

Hi P S,

I think this is unlikely.
Location plugin GetLocation does not have an "address" information.
It just returns the latitude and longitude.

You probably are passing the coordinates retrieved by the Location Plugin to a service to return the address.

Cheers.

Eduardo Jauch wrote:

Hi P S,

I think this is unlikely.
Location plugin GetLocation does not have an "address" information.
It just returns the latitude and longitude.

You probably are passing the coordinates retrieved by the Location Plugin to a service to return the address.

Cheers.

Thank you very much for your help.

P S.