class Geocoder::Result::Tencent

def address

def address
  "#{province}#{city}#{district}#{street}#{street_number}"
  #@data['title'] or @data['address']
end

def address_components

def address_components
  @data['address_components'] or @data['address_component']
end

def city

def city
  @data['address_components'] and (@data['address_components']['city']) or 
  (@data['address_component'] and @data['address_component']['city']) or
  ""
end

def coordinates

def coordinates
  ['lat', 'lng'].map{ |i| @data['location'][i] }
end

def country

def country
  "China"
end

def country_code

def country_code
  "CN"
end

def district

def district
  @data['address_components'] and (@data['address_components']['district']) or 
  (@data['address_component'] and @data['address_component']['district']) or
  ""
end

def postal_code

def postal_code
  ""
end

def province

regular geocoding API.
'address_component' compared to 'address_components' in the
NOTE: The Tencent reverse geocoding API has the field named
def province
  @data['address_components'] and (@data['address_components']['province']) or 
  (@data['address_component'] and @data['address_component']['province']) or
  ""
end

def state_code

def state_code
  ""
end

def street

def street
  @data['address_components'] and (@data['address_components']['street']) or 
  (@data['address_component'] and @data['address_component']['street']) or
  ""
end

def street_number

def street_number
  @data['address_components'] and (@data['address_components']['street_number']) or 
  (@data['address_component'] and @data['address_component']['street_number']) or
  ""
end