geocoding

After months of 100% stability, today I get 403 Error on google maps services

≯℡__Kan透↙ 提交于 2019-11-28 01:31:45
I was just wondering if someone could shed some light on why I am seeing 403 Forbidden errors for my google maps services. I had been loading the maps api as such: <script type="text/javascript" src="//maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script> And then using both the geocoding and autocomplete libraries to turn user searches into co-ordinates to display on a map on my search results. This was working perfectly (for months) until yesterday, when I started seeing 403 Errors whenever the Autocomplete service was accessed. I am 100% confident I wasn't reaching the

Google maps geocode API V3 not returning result in javascript function

血红的双手。 提交于 2019-11-28 01:27:45
问题 I'm trying to use the Google geocoder API V3 to plot a location on a map based on an address specified by the user, code is below. When I make a request directly (e.g. to http://maps.googleapis.com/maps/api/geocode/json?address=peterborough&sensor=false) I get the expected response. However, when I make the same request using the code below, the midpoint variable is always undefined after the getLatLong function has exited. What am I doing incorrectly? function loadFromSearch(address) {

Using a callback function with Google Geocode

孤人 提交于 2019-11-28 01:19:15
问题 I've been struggling with this for a few hours now, and even after reading several examples on Stack I've been unable to get this working. It doesn't help that I'm a JS newbie. I'm trying to retrieve information about an address from the Google Geocoder API, and then pass the object over to another function. Per my reading I understand that function I'm using to retrieve the information is asynchronous, and therefore I need to use a callback function to read it. However, when I attempt to do

Where to place API key for Google Geocoding API?

守給你的承諾、 提交于 2019-11-27 23:46:31
问题 We use Google Geocoding API to map address to Latitude and Longitude. Here is the sample URL for encoding (which returns json) - http://maps.googleapis.com/maps/api/geocode/json?address=Dallas&sensor=false Message: OVER_QUERY_LIMIT Ok, it makes sense, because we exceed over 2500 daily limit so we place API key like this - http://maps.googleapis.com/maps/api/geocode/json?key=xxxxx&address=Dallas&sensor=false Message: REQUEST_DENIED I'm wondering where/how to place the API Key. 回答1: Looks like

Query nearby locations in table in ASP.NET Core 2 and Entity Framework Core 2

笑着哭i 提交于 2019-11-27 23:11:45
问题 I'm trying to make a query where I can find all locations in my SQL database within (lets say 50 miles) of a given Longitude and Latitude points. I populated some posts, and in the Post table I have two columns where I store Longitude and Latitude when creating a post. Here is how the table looks: I have browsed many examples of how to try to implement this, but it seems like they just don't work. I know from researching that ASP.NET Core doesn't support DbGeography , and other articles are

Get latitude and longitude based on zip using Geocoder class in IOS

痞子三分冷 提交于 2019-11-27 21:51:42
问题 I got the current location based on Longitude and latitude values and then I also got Multiple places on google map using Annotation now I want get longitude and latitude values based on Zip code I don't know how to get Longitude and latitude values base on Zip code 回答1: this is the method for call google map api for geocoding, if u pass the Zipcode/Postal code, you get the result -(void)ViewDidLoad { NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString

Distance between 2 geocodes

谁都会走 提交于 2019-11-27 21:41:23
What is the formula for calculating the distance between 2 geocodes? I have seen some of the answers on this site but they basically say to rely on SQL Server 08 functions, I'm not on 08 yet. Any help would be appreciated. Use an approximation of the earth and the Haversine formula. You can get a javascript version on the following url, which you can translate to your language of choice: http://www.movable-type.co.uk/scripts/latlong.html Here is another way: http://escience.anu.edu.au/project/04S2/SE/3DVOT/3DVOT/pHatTrack_Application/Source_code/pHatTrack/Converter.java Take a look here for a

How can we get tweets from specific country

こ雲淡風輕ζ 提交于 2019-11-27 19:18:32
问题 I've read a lot about this part and what I found is to write the geocode and search for tweets for example https://api.twitter.com/1.1/search/tweets.json?geocode=37.781157,-122.398720,1mi&count=10 according to what i found in twitter website Returns tweets by users located within a given radius of the given latitude/longitude. A maximum of 1,000 distinct "sub-regions" will be considered when using the radius modifier. Example Values: 37.781157,-122.398720,1mi The question!, how can we define

Create or update mapping in elasticsearch

旧街凉风 提交于 2019-11-27 19:14:49
I am new to Elasticsearch and am currently working on implementing a geo_distance filter for searching. As of now my index has the following mapping (I've removed some fields): { advert_index: { mappings: { advert_type: { properties: { __v: { type: "long" }, caption: { type: "string" }, category: { type: "string" }, **location: { type: "long" },** } } } } The geo_distance field is going to be implemented on the location field, where an example instance looks like this: "location": [ 71, 60 ], I.e. is on geoJSON format [lon, lat] . I understand that I will have to update my index so that the

Given a latitude and longitude, and distance, I want to find a bounding box

天涯浪子 提交于 2019-11-27 18:25:34
问题 Given a latitude and longitude, and distance, I want to find a bounding box where the distances are less than the given distance. This questions was asked here: How to calculate the bounding box for a given lat/lng location? I donot want this partcularly accurate, so I have modified and simplified it to def boundingBox(latitudeInDegrees, longitudeInDegrees, halfSideInKm): lat = math.radians(latitudeInDegrees) lon = math.radians(longitudeInDegrees) halfSide = 1000*halfSideInKm RADIUS_OF_EARTH