Creates a new place object at the given latitude and longitude.
Before creating a place you need to query GET geo/similar_places with the latitude, longitude and name of the place you wish to create. The query will return an array of places which are similar to the one you wish to create, and a token. If the place you wish to create isn't in the returned array you can use the token with this method to create a new one.
Learn more about Finding Tweets about Places.
Resource URL
Parameters
The name a place is known as.
Example Values: Twitter%20HQ
The place_id within which the new place can be found. Try and be as close as possible with the containing place. For example, for a room in a building, set the contained_within as the building place_id.
Example Values: 247f43d441defc03
The token found in the response from geo/similar_places.
Example Values: 36179c9bf78835898ebf521c1defd4be
The latitude the place is located at. This parameter will be ignored unless it is inside the range -90.0 to +90.0 (North is positive) inclusive. It will also be ignored if there isn't a corresponding long parameter.
Example Values: 37.7821120598956
The longitude the place is located at. The valid ranges for longitude is -180.0 to +180.0 (East is positive) inclusive. This parameter will be ignored if outside that range, if it is not a number, if geo_enabled is disabled, or if there not a corresponding lat parameter.
Example Values: -122.400612831116
This parameter searches for places which have this given street address. There are other well-known, and application specific attributes available. Custom attributes are also permitted. Learn more About Geo Place Attributes.
Example Values: 795%20Folsom%20St
If supplied, the response will use the JSONP format with a callback of the given name.
Example Request
POST | |
POST Data | |
{
"name": "Twitter 3rd Floor Lunch Room",
"polylines": [
],
"country": "The United States of America",
"country_code": "US",
"attributes": {
},
"url": "http://api.twitter.com/1/geo/id/6b9811c8d9de10b9.json";,
"id": "6b9811c8d9de10b9",
"bounding_box": {
"coordinates": [
[
[
-122.400612831116,
37.7821120598956
],
[
-122.400612831116,
37.7821120598956
],
[
-122.400612831116,
37.7821120598956
],
[
-122.400612831116,
37.7821120598956
]
]
],
"type": "Polygon"
},
"contained_within": [
{
"name": "Twitter HQ",
"country": "The United States of America",
"country_code": "US",
"attributes": {
"street_address": "795 Folsom St"
},
"url": "http://api.twitter.com/1/geo/id/247f43d441defc03.json";,
"id": "247f43d441defc03",
"bounding_box": {
"coordinates": [
[
[
-122.400612831116,
37.7821120598956
],
[
-122.400612831116,
37.7821120598956
],
[
-122.400612831116,
37.7821120598956
],
[
-122.400612831116,
37.7821120598956
]
]
],
"type": "Polygon"
},
"full_name": "Twitter HQ, San Francisco",
"place_type": "poi"
}
],
"geometry": {
"coordinates": [
-122.400612831116,
37.7821120598956
],
"type": "Point"
},
"full_name": "Twitter 3rd Floor Lunch Room, Twitter HQ",
"place_type": "poi"
}