geocode

Convert latitude and longitude coordinates to country name in R

守給你的承諾、 提交于 2019-12-17 10:58:02
问题 I have a list of latitude and longitude coordinates, and wish to find out which country they all reside in. I modified an answer from this question about lat-long to US states, and have a working function, but I run into the problem that the worldHires map (from the mapdata package) is hideously out of date and contains a lot of obsolete countries such as Yugoslavia and the USSR. How would I modify this function to use a more modern package, such as rworldmap ? I have only managed to

Store result of Google Maps geocode function

[亡魂溺海] 提交于 2019-12-14 02:31:24
问题 I want to get the result of Google Maps API geocode() function in order to use it to other functions. I have put the code below on an OnClick event to reverse geocode the address of the point clicked on map. It is always having the previous value of point clicked. Example: the first time i click it has 'undefined', 2nd time it has the address of the point i clicked before and so on. var address ; my_listener = google.maps.event.addListener(map, 'click', function(event) { codeLatLng(event

Google Maps API function does not return results in time

眉间皱痕 提交于 2019-12-13 10:22:27
问题 So I have an array of objects with the following properties: Address , Latitude , Longitude , and Title poi("139 Main St", 0, 0, "Farmer's Market" ), poi("18 N Hopkins Ave", 37.4455, -143.7728, "YMCA" ), poi("42 Universe St", 37.4855, -143.8781, "Original Pizza #32" ) Now, the first object does not have anything set for latitude and longitude, so I was hoping to use Google's Geocode API to fill in the missing data. I included the API script link with my API key, which is working fine. I then

Geocoder suddenly stopped working

我的未来我决定 提交于 2019-12-13 08:11:47
问题 I am using Geocoder to get the lat and long in my android application. It was working fine some while back but now it just stopped working. I didn't change the code. Why this happned? public void onItemClick(AdapterView adapterView, View view, int position, long id) { String str = (String) adapterView.getItemAtPosition(position); List<Address> addressList= null; if(str != null || str.equals("") ){ Geocoder geocoder = new Geocoder(this); try { addressList = geocoder.getFromLocationName(str, 1)

google geocode vai ajax with jsonp, giving an error

人盡茶涼 提交于 2019-12-13 05:20:00
问题 i am trying to use google geocode vai ajax with jsonp, here is the code jQuery("#getaddress").on("click", function () { jQuery.ajax({ dataType: 'jsonp', url: 'http://maps.googleapis.com/maps/api/geocode/json', data: { address: 'rajshahi', sensor: false }, success:function(results){ console.log(results); } }); }); josn return is cominf nicely but it's giving this error invalid label [Break On This Error] "results" : [ json?c...6919370 (line 2, col 3) Please let me know what need to do to solve

Google geocode API returns location of motorway rather than postcode area supplied

六眼飞鱼酱① 提交于 2019-12-13 05:17:06
问题 I get the same result if I use the URL or javascript APIs. If I pass (as an address) the location "M5" for geocoding, rather than returning the location of the M5 Postal Area (Salford, Manchester) the location returned is the centre of the M5 Motorway. Interestingly in the old google maps (http://maps.google.co.uk) I get the same behaviour but the new google maps (same URL) returns the correct area. Is there another way I can define the location (rather than 'address') that will be more

How to implement a search for location in Android?

此生再无相见时 提交于 2019-12-13 05:14:37
问题 Basically, on button click, I want the user to input a keyword or an exact location name, and in a listview, I want to show all the locations that match the given keyword within a certain radius or state/region. I've read about Geocoder/Google Maps and stuff like that, but is there like any tutorials that go in depth on how to do what I'm trying to do? I'm pretty confused on the whole subject. Thanks. 回答1: I use to different ways: 1) Android Location Geocoder Geocoder geocoder = new Geocoder

Google map disappearing in APEX region

与世无争的帅哥 提交于 2019-12-13 04:51:18
问题 I'm trying to display map in one of my apex pages region, this map will have draggable marker which links to text-fields on other region and displays geocode for latitude and longitude. Everythings works except one thing the map is appearing just for 0.5 second and disappears. I think the problem is somewhere within coding as I have other similar program where map works perfectly fine. I'm using PL/SQL to retrieve map from procedure in a database. Here is my PROCEDURE: create or replace

JavaScript Promise not executing .then()

穿精又带淫゛_ 提交于 2019-12-13 04:13:36
问题 I was having some problem with Promise in JavaScript. What I am trying to do is I got a list of address, then for each address, I need to call the geocode API to get the lat lng, then I will proceed to plot the markers together with the heatmap. Here is my code: let promiseKey = Promise.all( result.map() ); var addedMarkers = promiseKey.then( markers => Promise.all( markers.map() ) ) .then(drawForecastHeatmap); The part where I call the geocode API: function getBranchLatLng(address,

Write a location and get the geocords, not working properly? JS

被刻印的时光 ゝ 提交于 2019-12-12 05:48:19
问题 Link removed This is my site. Im working on so you can enter a location on the search input field, and then see theres xx km from a restaurant. Now i got almost everything working. If you see the source code you can see how it works. It showAddress(what you searched). And then show addresses makes it into lat/lng cords, and pass it to computeRestaurants() which computes the distances between the location you entered and the restaurants. Somehow, when I run: computeRestaurants(new google.maps