Menu
  • HOME
  • TAGS

Google Geocoding XML response removes apartment/suite numbers

google-maps,geocoding,google-geocoding-api

The trouble you are experiencing goes back to the core philosophy and use case goals for the Google Geocoding API: identify the latitude/longitude coordinate of a structure or facility and plot it on a map. Secondary information (suite, apartment, etc.) is generally not necessary to fulfill that goal and is...

Geo-fencing with Bing SDS

javascript,azure,geocoding,bing-maps,geofencing

In order to insert and set the geofences, you will have to create your own datasource using the Data Source Management capabilities of the Bing Maps Spatial Data Service. See: https://msdn.microsoft.com/en-us/library/gg585132.aspx Do it by code: A sample uri that will add the remote content (stored on Azure) will look like...

How to get all the street names from a Google Direction Request response?

google-maps,geocoding,routes,reverse-geocoding,directions

One of the elements of a directions API response is an encoded polyline. This is the polyline.points attribute. You can decode this - using PHP for example to obtain a list of lat-long coordinates. This will give you the actual path of the route to use with your data.

I want to search area name on my Google Map V2

android,google-maps,geocoding

This code you can put in your onCreateOptionMenu of your activity @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.show_map, menu); SearchManager searchManger = (SearchManager) getSystemService(Context.SEARCH_SERVICE); SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView(); searchView.setSearchableInfo(searchManger.getSearchableInfo(getComponentName())); //searchView.setIconifiedByDefault(false); SearchView.OnQueryTextListener queryTextListener = new...

In Python, trying to convert geocoded tsv file into geojson format

python,json,geocoding,geojson,tsv

You have a couple things going on here that need to get fixed. 1.Your TSV contains newlines with double quotes. I don't think this is intended, and will cause some problems. Location Movie Title Date Amenities Formatted_Address Lat Lng " Edgebrook Park, Chicago " A League of Their Own 7-Jun...

Where do geocoding API places get their data from?

gps,geocoding,postgis

It will be different depending on where you are in the world. In the UK, where I have most experience, addresses are maintained by the Post Office and the actual coordinates by the national mapping agency, which are either surveyed by GPS or inferred from geo-referenced aerial photography. In the...

How can I quickly lookup country and US state by lat/lng? [closed]

node.js,geocoding,reverse-geocoding

This module: https://github.com/vkurchatkin/which-country doest exactly that for countries. You can provide different .geo.json file to make it work for US states

Add transparency to GoogleMap plot (loa package)

r,plot,transparency,geocoding

I thought I might do it with 8 digit hexmode, but Roman was right. png(); print( GoogleMap(z ~ lat*lon,col.regions=list("yellow","red"), alpha.regions=list(alpha=.5, alpha=.5) ,panel=panel.contourplot) );dev.off() [1] "http://maps.google.com/maps/api/staticmap?center=45.5774096970577,12.540287147873&zoom=9&size=640x311&maptype=terrain&format=png32&sensor=true" ...

Javascript to return the the address of an user using Google Maps API

javascript,geocoding,google-geocoder,reverse-geocoding,google-geocoding-api

Your main problem: getCoordinates() does not return coordinates. So you cannot use it like this: var latlng = getCoordinates(); Javascript has asyncronous stuff. That means it takes javascript some time to do it. The way javascript handles this: You send a request, and you provide a callback (a function). Whenever...

geocode a marker in Google Maps

javascript,google-maps,google-maps-api-3,geocoding

There are a few things wrong with your code. 1) codeAddress is never called (as Anto Jurković notes). 2) A new instance of map is created within codeAddress if it were ever called which is redundant. 3) While you've specified Postcode as a string at the top of the code,...

getFromLocationName().size() returns always 0 - Android

java,android,google-maps,geocoding,location-based

A problem might be that the lookup is not done in a background thread, try and copy-paste the code from my answer here: Google Geocoder service is unavaliable (Coordinates to address) Then run new GetAddressPositionTask().execute("someAddress") and see what happens. Passing a context to the AsyncTask: Add a constructor: public class...

Custom Mapbox Geocoder Control

leaflet,geocoding,mapbox

If you were to show Mapbox geocoder results not in conjunction with one of their maps, it would violate the Mapbox Terms of Service. This would explain why there are no independent libraries for doing so. But what you describe doesn't sound like it would necessarily run afoul of the...

GeoGoogle - Google Geocoder Java API

java,google-maps,geolocation,geocoding

Seems to have moved to a different location: The Google Geocoding API

Country/region codes (iso-3166-1/iso-3166-2) to longitude and latitude

java,geolocation,geocoding

Since I didn't get any answers, I will explain how I solved it. I found this csv listing for the iso-3166-1 country code centroids: http://dev.maxmind.com/geoip/legacy/codes/country_latlon/ (I had to make a few manual tweaks) As for the iso-3166-2 region centroids, I ended up creating a shell script which uses the Google...

Merge two MySQL query and get distance between two zip codes

php,mysql,geocoding,latitude-longitude,google-latitude

You can use the spacial functions and spacial type columns http://dev.mysql.com/doc/refman/5.5/en/spatial-extensions.html Here it's a great example to use spacial functions! http://www.mysqlperformanceblog.com/2013/10/21/using-the-new-spatial-functions-in-mysql-5-6-for-geo-enabled-applications/ Or you can define a custom function CREATE DEFINER=`test`@`%` FUNCTION `geoDistance`(`lon1` DOUBLE, `lat1` DOUBLE, `lon2` DOUBLE, `lat2` DOUBLE) RETURNS double LANGUAGE SQL DETERMINISTIC NO SQL SQL SECURITY DEFINER COMMENT...

How to get City / State / Country for Mapbox using reverse geocoding?

geocoding,mapbox

I ended up coming up with this function based on what mapbox returned. The root node gives the town/city, and then gives the context around it. It was a matter of checking which context was the postal code and excluding that, while rebuilding the string. //builds proper format of location...

Inconsistent administrative_area_level_1 geocode for same city (accented)

google-maps,geolocation,geocoding,google-geocoding-api

If you want French as a language of your resulting data you have to mention that in your language parameter of your request. However, to group addresses into district city and country you can use the following API request. https://maps.googleapis.com/maps/api/geocode/json?address=Winnetka&language=fr&key=API_KEY In the response your district will be administrative_area_level_2 the states...

Mapbox Geocoding

javascript,geocoding,mapbox

Basically you have to register a listener for select event: geocoder_control.on('select', function(object){ var coord = object.feature.geometry.coordinates; //create and add your marker }); I've made an example for you: http://plnkr.co/edit/joOXJ6?p=preview...

How to get Full address from lat/lng using Google Play Service ( Not use Geocoder)

android,google-maps,geocoding,reverse-geocoding

Have you try with googleapis.com, geocode get location from lat an lng simply try to pass your lat and long to the following query string, and you will get a json array, fetch your city from there http://maps.googleapis.com/maps/api/geocode/json?latlng=10.792986,106.670004&sensor=true...

Invalid GeoJSON for polygon

json,google-maps,geocoding,geojson

This works for me in geojsonlint.com (changed your points slightly to make it not look like a straight line): { "type": "Polygon", "coordinates": [ [ [43.8526377,-79.0499898], [43.854,-79.051], [43.8526716,-79.0504057], [43.8526377,-79.0499898] ] ] } However, looking closer at that map, they are in Antarctica, you probably wanted this, which is in Canada,...

Using the MapQuest geocoding API to get the correct zoom to an area

javascript,maps,geocoding,leaflet,mapquest

To be straight to the point you can't. According to the specification of Mapquest's geocoding response, no bounding box is sent, only a pair of latitude/longitude coordinates.

Effect of Locale on Android Geocoder

android,locale,geocoding

Unfortunately I don't have a great answer but from what I gather this is what I think you should do. I would double check that you are not seeing a crash or exception thrown from the Geocode api on your users devices. If the case is still that you are...

Matlabs ellipse hours calc

matlab,geolocation,geocoding,ellipse,hour

function [hx,hy] = calcHourCoords(ra,rb) %input: %ra, rb length of semi-axis in ellipse %output: %hx, hy coords of hour's plot hourAngle = 15*pi/180; step = 0; for i=1:1:24 hx(i)= ra * sin(step); hy(i)= rb * cos(step); step = step+hourAngle; end end ...

Associate marker with proper request in multiple geocoding

google-maps,google-maps-api-3,geocoding

You'll need to create closures: for (var i = 0; i < elements.length; i++) { $.getJSON('http://maps.googleapis.com/maps/api/geocode/json?address=' + encodeURIComponent(elements[i].address), null, (function(element){ return function(data){ console.log(element.id,data.results[0]); } }(elements[i]))); } But for clientside geocode-requests you should use the method of the javascript-API(requesting the webservice may fail, because it's not guaranteed that the appropriate headers...

Use geocomplete function after ajax event

javascript,jquery,ajax,geocoding

AJAX is Asynchronous (Asynchronous JavaScript and XML) That means it might execute after the main code has been finished processing $.ajax({ url: '/ajax/get-location-input', success:function(data){ alert(data); } }); alert('Hi '); In this case, Hi will alert first, then data. In your case, the inputs might not even be generated yet and...

geocodeAddressString is not running for the following address

ios,objective-c,geocoding

your placemarks1 array is probably empty, as you're not checking if it is or not, the block just isn't executing. This is the common format [self.geocoder geocodeAddressString:address completionHandler:^(NSArray *placemarks, NSError *error) { if ([placemarks count] > 0) { CLPlacemark *placemark = [placemarks objectAtIndex:0]; CLLocation *location = placemark.location; CLLocationCoordinate2D coordinate =...

Reverse Geocoding does not give the right locations

php,xml,google-maps,coordinates,geocoding

There are different issues, the 2 most basic: there is a limit of 10 requests/sec for geocoding. Print $jsondata['status'] after each request and you'll see that a lot of the requests fail because of the limit. Solution(not 100% guaranteed): Call usleep(100000); before each request to be sure that there are...

Google Map in multipage form.

javascript,jquery,html,google-maps,geocoding

As others have said this is likely a sizing problem in that, when the map is initialized, the map container has a width and height of 0, since it is hidden. You should be able to get round this by either waiting to initialize your map until the second 'page'...

Why Google map Gocode return zero results on my android device (not on a browser)

java,android,google-maps,http,geocoding

adresse is not a string here but a vararg. You probably want to pick the first string in there so use adresse[0] here.

cannot get Locality using Geocoder and GPS in android

android,geocoding,google-geocoder

Actually Brother sometimes GEOCoder will not work perfectly so You have to use like this: JSONObject ret = getLocationInfo(latlng_Source.latitude, latlng_Source.longitude); Log.e("address string", ret.toString()); JSONObject location; try { location = ret.getJSONArray("results").getJSONObject(0); mCuurentAddress = location.getString("formatted_address"); Log.d("test", "formattted address:" + mCuurentAddress); } catch (JSONException e1) { e1.printStackTrace(); } public JSONObject getLocationInfo(double lat, double...

Polygon geofencing with iOS

ios,geolocation,geocoding

1) iOS only allows to create circular geofences indeed however what you are trying to achieve is possible with some extra logic. I have developed similar features so I suggest you to do the following: create a circular geofence that embeds your polygon when the device gets notified as being...

GeoGoogle - Google Geocoder Java API deprecated?

java,google-maps,geolocation,geocoding

Seems to have moved to a different location: The Google Geocoding API

Google's geocoder not encoding special characters

html,asp.net,google-maps,character-encoding,geocoding

Why you don't use UTF-8? A lot of database are in UTF-8...

leaflet geocoding with input box

javascript,geocoding,leaflet

Yes, you should use the providers directly if you do not want to use the control's own input and other features. Each provider has a method called GetLocations, which takes two arguments: qry: string containing the search query callback: a function that will be called when the results are available...

Reverse GeoCoding Issues with OpenStreetMap/Nominatim

geocoding,openstreetmap,nominatim

Take a look at the returned object. It is located somewhere in the Atlantic Ocean and consequently can't have a full address. Not the response is strange but the object is. I will delete it.

Android LatLng parsing

android,map,google-maps-markers,geocoding

try this way extract Latitude and Longitude from LatLng @Override public void onMapLongClick(LatLng latLng) { Double lat=latLng.latitude; Double longi=latLng.longitude; ......... .......... //do your job } ...

How to properly use geocoder from Google Maps API

google-maps,google-maps-api-3,geocoding,google-geocoder

You could try appending " Delaware state" or " Delaware, USA". There isn't any documented rule I know of, except that it attempts to match "postal addresses". Per the documentation you can bias the search: by viewport by region code ...

How to enable google map service

android,geocoding

Just follow the developers guide for setting up map in android apps. Following is a quick guide line Download the google playservices from android sdk manager Add this to eclipse and add this as library for your project Add your keys and other prerequisties inside google console Embed the necessary...

Get the location of a well known location like Eiffel Tower with google geocoding?

google-maps,geolocation,geocoding,google-geocoder

What you are looking for is places API, not locations. ;]

How to get values from callback functions in NodeJS?

javascript,node.js,callback,geocoding

You can never get the response status if you don't do anything about the callback function. First of all: geoPerson.save(function (err) { if (!err) { console.log("Created"); status="true"; } else { console.log(err); status="false"; } callback(status); }); Now you should provide a callback function that will send the response. Instead of return...

Android Reverse Geocoding

android,google-maps,geocoding

The issue is with Android Emulator. Even when you set coordinates via the command line the emulator will not preform GeoCoding code and therefore fails on my check if GeoCoder present. Works just fine on a physical device.

Why Google's Webservice is returning approximate vs. rooftop or other location types?

google-maps,google-maps-api-3,geocoding,google-geocoding-api

So basically you have to follow the standard mailing address format that is used by the respective country the address falls in and refrain from using apt/house/suite numbers. Use street number for the building/complex/entity rather than names. This is what you need to go through. However, please do your research...

How to check if marker is out of specific constant bounds? - Google Maps API v3

google-maps,google-maps-api-3,geocoding

So you want to have an event listener for when the marker is dragged, using the bounds' contains function. Also if you really want to prevent them dragging that marker outside of the bounds, you probably also need to keep track of what the position was originally, and reset it...

How do I select the subset of my lat/lon data that is highway travel using R?

r,google-maps,geocoding

I just found this post and thought this is an interesting question. I wanted to download your sample data file. Unfortunately, the link was not working any more. Therefore, I could not try the whole process I had in my mind. However, I believe the following will let you move...

Regarding Geotagged videos & information provided by the video in the terms of gis

java,geolocation,gis,geocoding,geospatial

Basically Geo-tags are just metadata entries on the file. For code, I suppose you could check metadata-extractor from google code, or see older question in here for general Get Video file metadata in Java...

Using the appropriate function from the 'apply' family when batch geocoding in R

r,geocoding,apply

Lapply returns a list and sapply is a user-friendly version of lapply by default returning a vector or matrix if appropriate. You can use sapply() then with t(): data.object <- with(data.object, data.frame(Street.Address, t(sapply(Street.Address, function(val){getGeoCode(val)})))) ...

Location not correctly displaying when trying to set map from lat and long co-ordinates

android,google-maps,geocoding,reverse-geocoding

Based on the comments and private conversation on chat, the solution is to create a CameraPosition using a CameraPosition.Builder and then calling animateCamera() using the CameraPosition: CameraPosition cameraPosition = new CameraPosition.Builder() .target(position) .zoom(4) // Set your preferred zoom level here .build(); googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); You can also set the tilt and bearing....

MapRouteFinder.GetDrivingRouteAsync and MapServiceToken in Windows Phone 8.1 XAML

c#,xaml,windows-phone-8,windows-phone-8.1,geocoding

I have a working app that uses this token. I only set it to a Map control in XAML, and then I can use both the Map and the MapService, apparently. My Maps key token is 22 characters long. The only way to get it is, AFAIK Make an app...

Google Maps API Geocoding Multiple Locations

javascript,google-maps,geocoding

This solution works for two, perhaps up to 10 locations, after that you will start running into the query and rate limits on the Geocoder separate out the initialize function, just initializes the map create a unique geocoder instance for each location (you can reuse the same geocoder instance by...

Instantiating Geocoder causes NullPointerException

android,google-maps,geocoding,google-geocoder

Move the initialization in onCreate : private Geocoder geocoder; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); geocoder = new Geocoder(this); SupportMapFragment mapFragment = (SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map); mapFragment.getMapAsync(this); } getApplicationContext() is likely to return null if the Activity creation is not finished....

Getting address coordinates through Google geocoding

javascript,geocoding

alert("The coordinates of the....) will triggered only after completing the geocode callback function. But the alert ("Lat: "+lat+", \nLng: "+long); will fire immediately after the if (geocoder) { } condition without waiting for anything. That is why you are getting the 0 value for lat and long. Here assigning the...

Google Geocode region works only in certain cases

google-maps,google-maps-api-3,geocoding

From the documentation: Note that biasing only prefers results for a specific domain; if more relevant results exist outside of this domain, they may be included. To restrict the results to a specific country use Component Filtering e.g. https://maps.googleapis.com/maps/api/geocode/json?address=manchester&components=country:US ...

Retrive global variable [closed]

javascript,geocoding

the call to geocoder.geocode is asynchronous. the code execution gets to the declaration of var location before the asynchronous code has returned; therefore city will not be defined yet. declare location earlier and then add to the location object in the callback function var location = {lat: position.coords.latitude, lng: position.coords.longitude};...

Google Map is not appearing when connecting to database

javascript,php,mysql,json,geocoding

add this line to cheltenham.php echo json_encode($rows, JSON_FORCE_OBJECT); ...

Reverse Geocoding: How to get exact locality

google-maps,geocoding,reverse-geocoding

Geocoding is not one-to-one; a single lat/lon corresponds to multiple things. The best you can do is to rank them on importance (Google already does this) and pick the most important one. You can also sort them based on your own parameters, such as the distance to your query point....

Mongodb Query for finding distance between latitude and longitude points

mongodb,mongoose,geolocation,geocoding,mongodb-query

Mongo does not provide you with easy field manipulations like you had in sql world. Some of the geospatial results give you back the distance as well, but for the task you want, I would rather do this calculation afterwards. There is a question on SO which targets you perfectly...

Available documentation on how to integrate here maps restful services to Asp.Net?

routing,geocoding,reverse-geocoding,here-api,here-maps

the documentation for all of the Rest APIs would be available at the developer.here.com/documentation In general, REST services are used through HTTP GET/POST, thus just see how the HTTP queries are handled in your selected technology, and then see the documentation for the URL used, and how the data is...

Reverse Geocoding gives IOException.. why always timed out?

java,android,geocoding,reverse-geocoding,request-timed-out

It sounds like a network or server issue that is out of your control. You could try exponential backoff (example) as a way to deal with it.

Get bounding polygon coordinates from Google Maps

google-maps,google-maps-api-3,maps,geocoding

If what you mean is "is it possible to get boundaries of any place returned by Google Places API as we can see in Google Maps ?", the answer is no, you have to use KML files describing the polygon representing the boundaries of the place. Depending of what you...

iOS Swift coordinates function returns nil

ios,swift,geocoding

There are two issues here: You want to return the actual lat and long variables, not CLLocationDegrees(). A more subtle issue is that you're calling a function that returns its results asynchronously, so you cannot return the values immediately. Instead, you might employ your own completionHandler pattern. For example: func...

How to deal with geopy's query limit?

python-3.x,geocoding

Geopy just relies on web API to do the conversion. And, All web API have limits on the amount of queries you can do, particularly if they are free. You can either look for an API which has higher query limits (probably in exchange for a fee), or, for instance,...

ST_SnapToGrid units

sql,database,postgresql,geocoding,postgis

The size is specified in the same units as the SRID of the geometry. In the case of SRID 4326 this is decimal degrees. The actual distance that is of course varies depending on the actual latitude and longitude of the point in question. If this matters, if might help...

Reverse Gecoding to return full formatted address [duplicate]

javascript,google-maps,geolocation,geocoding,reverse-geocoding

Have you tried to change results[1] for results[0]? From Google Geocode Docs docs: results[0].formatted_address: "275-291 Bedford Ave, Brooklyn, NY 11211, USA", results[1].formatted_address: "Williamsburg, NY, USA", results[2].formatted_address: "New York 11211, USA", results[3].formatted_address: "Kings, New York, USA", results[4].formatted_address: "Brooklyn, New York, USA", results[5].formatted_address: "New York, New York, USA", results[6].formatted_address: "New York, USA",...

add elements to the ArrayList

java,arrays,geocoding

try this: public class Receiver { private static ArrayList<LatLong> latLongList = new ArrayList<>(); @POST @Consumes(MediaType.APPLICATION_JSON) public Response storeData(Data data) { String macD = data.getMac(); int routeD = data.getRoute(); float latD = data.getLatitude(); float longD = data.getLongitude(); latLongList.add(new LatLong(latD, longD)); System.out.println("latLondList size: " + latLongList.size()); Database db = new Database(); db.insertData(macD,...

Should I use Google Maps API/Geocoding to power a store finder

google-maps,maps,coordinates,geocoding

The best way of course would be when you use a geocoding-service to get coordinates and store the coordinates in your DB. But it's not possible with google's geocoding-service, because it's not permitted to store geocoded data permanent. There are free services without this restriction, some keywords to search for:...

How to convert an address string to an address dictionary

osx,geocoding,addressbook

If you are using a data detector with type NSTextCheckingTypeAddress, the returned matches should provide an addressComponents dictionary. That dictionary contains all the keys you mentioned. NSDataDetector* detector = [NSDataDetector dataDetectorWithTypes:NSTextCheckingTypeAddress error:nil]; NSString* addressString = @"Apple, 1 Infinite Loop, Cupertino, CA"; NSArray* matches = [detector matchesInString:addressString options:0 range:NSMakeRange(0, addressString.length)]; for(NSTextCheckingResult*...