Tweet Geo-Locator

Locate Tweet When GeoLocation Is Turned Off!





Latitude Longitude



API


Request Headers
POST /api/geolocate_tweet HTTP/1.1
Host: firstdraftgis.com
Connection: keep-alive
Content-Length: 106
Pragma: no-cache
Cache-Control: no-cache
Accept: application/json, text/plain, */*
Origin: http://firstdraftgis.com:8000
User-Agent: Mozilla/5.0 (X11; CrOS x86_64 9202.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.137 Safari/537.36
Content-Type: application/json;charset=UTF-8
Referer: http://firstdraftgis.com:8000/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8

Request Payload
{"text":"Flood-risk areas in Bekasi likely to increase due to overflowing streams"}
                    

var url = "https://firstdraftgis.com/api/geolocate_tweet";
var tweet_text = "Flood-risk areas in Bekasi likely to increase due to overflowing streams";
var data = { text: tweet_text };
$http.post(url, data).then(function(response) {
    console.log("latitude:", response.data.latitude);
    console.log("longitude:", response.data.longitude);
});

from requests import post

url = "https://firstdraftgis.com/api/geolocate_tweet"
tweet_text = "Flood-risk areas in Bekasi likely to increase due to overflowing streams"
data = {"text": tweet_text}
response = post(url, data).json()
print "latitude:", response.latitude
print "longitude:", response.longitude