Skip to Content

contrôle

  1. # contrôle avec simplegeo.places
  2. print client.get_feature('SG_41gn625SLWoHJOeoPYJ81b_48.859400_2.294160@1299419564').to_dict()
  3. {'geometry': {'type': 'Point', 'coordinates': (Decimal('2.29416'), Decimal('48.8594'))},
  4. 'type': 'Feature',
  5. 'id':'SG_41gn625SLWoHJOeoPYJ81b_48.859400_2.294160@1299419564',
  6. 'properties': {'city': 'Paris', 'name': 'Tour Eiffel', 'country': 'FR', 'private': 'false', 'href': 'http://api.simplegeo.com/1.0/features/SG_41gn625SLWoHJOeoPYJ81b_48.859400_2.294160@1299419564.json', 'postcode': '75007', 'address': '7 Av Anatole France', 'owner': '6338', 'classifiers': []}}
  7.  
  8. # contrôle avec simplegeo.context
  9. client2 =simplegeo.context.Client(''votre code OAUTHKEY', 'votre code SECRET')
  10.  
  11. print client2.get_feature('SG_41gn625SLWoHJOeoPYJ81b_48.859400_2.294160@1299419564').to_dict()
  12. {'geometry': {'type': 'Point', 'coordinates': (Decimal('2.29416'), Decimal('48.8594'))},
  13. 'type': 'Feature',
  14. 'id': 'SG_41gn625SLWoHJOeoPYJ81b_48.859400_2.294160@1299419564',
  15. 'properties': {'city': 'Paris', 'name': 'Tour Eiffel', 'country': 'FR', 'private': 'false', 'href': 'http://api.simplegeo.com/1.0/features/SG_41gn625SLWoHJOeoPYJ81b_48.859400_2.294160@1299419564.json', 'postcode': '75007', 'address': '7 Av Anatole France', 'owner': '6338', 'classifiers': []}}