geocoding

Google maps API - add marker by address javascript

时光怂恿深爱的人放手 提交于 2019-12-03 01:05:44
I have database of places with addresses and I want to add markers on google maps. It shows only the default marker, seems like the geocoder.geocode() does nothing. For an example I'm trying to add a marker on " New York City", with no success. <script> var geocoder; var map; var address = "new york city"; geocoder = new google.maps.Geocoder(); function initMap() { var uluru = { lat: -25.363, lng: 131.044 }; var map = new google.maps.Map(document.getElementById('map'), { zoom: 4, center: uluru }); var marker = new google.maps.Marker({ position: uluru, map: map }); codeAddress(address); }

current location is always null

匆匆过客 提交于 2019-12-03 00:50:09
I am trying to retrieve my current location on the button click in an editbox using gps or network..i have tried all possible methods which i found in tutorials and older posts....but my location is always null.. i am not getting where i am wrong.? i am testing it on real device having network but no internet/gprs... this is the code which i am using..i tried the same with GPS_PROVIDER as well ..please help me.. protected void showCurrentLocation() { geocoder = new Geocoder(this); locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); locationManager

Polygon geofencing with iOS

那年仲夏 提交于 2019-12-03 00:29:20
I am trying to find a way to create several polygon geofences with iOS. I need to draw multiple zones in a city to represent areas, streets, etc. From what I've read so far, iOS only allows circular zone from a geolocated device. Is it feasible with iOS? Is there a web app somewhere to draw polygons on a map and generate the coordinates in an array? Laurent 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

Best way to geocode UK postcode with Google Maps API?

拈花ヽ惹草 提交于 2019-12-03 00:26:37
What is the most effective and accurate way to geocode a UK postcode? Using the built in geocode object results in massively blurred results (lots of postcodes returning just a general area). Are there any free UK postcode geocoding services I can plug into via JavaScript? Edit: To be clearer this uses the local search in google search api, not the google maps api to do the geocoding which is much more accurate. The best way is to use Google Search Api. If you get an api key and get it all setup: http://code.google.com/apis/ajaxsearch/ var localSearch; var map; var icon; var

Does Google Maps API offer a way to search for locations by name?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 22:32:27
When one visits http://maps.google.com , they are able to type queries into the search field and receive results based on locations or places, and not hard search results, as they would in a normal Google Search query. They're a unique style of result (names of places, locations) suited to the Maps interface for obvious reasons. I've been digging through both the Maps and standard Google Search API for a couple hours now, and have done multiple searches on this question, and I can't seem to find the answer. They obviously have the Local Search, but that's been deprecated, and it only yields

Geocode Area Names of a City to get Lat and Long

我是研究僧i 提交于 2019-12-02 17:21:43
I have a list of areas names in my City and i need the Lat and Long of the same. Is there any service which i can use the get the Data ? I dont wanna use any map. I would like to make simple api calls and get the lat long via json or xml. You can use the Google Geocoding service: REST format: http://code.google.com/apis/maps/documentation/geocoding/index.html JavaScript: http://code.google.com/apis/maps/documentation/javascript/services.html#Geocoding EDIT : For those too lazy to read, here's the REST format example.. xml response: http://maps.googleapis.com/maps/api/geocode/xml?address

Plotting google map with ggplot in R

拈花ヽ惹草 提交于 2019-12-02 15:18:18
I am trying to plot Google map that is queried using RgoogleMaps package and combine it with ggplot. Ultimately, I want to show total population using geom_point , somewhat similar to the picture below however I am trying to concentrate on Montgomery region because of over-plotting. I am frustrated because I cannot plot my queried map in R. I tried a couple of packages such as read.jpeg and png but it didn't quite work out. R codes: #query google map al1 <- GetMap(center=c(32.362563,-86.304474), zoom=11, destfile = "al2.jpeg", format="jpg",maptype="roadmap") #load only specific states alabama

How can I find the center of a cluster of data points?

拈花ヽ惹草 提交于 2019-12-02 15:10:51
Let's say I plotted the position of a helicopter every day for the past year and came up with the following map: Any human looking at this would be able to tell me that this helicopter is based out of Chicago. How can I find the same result in code? I'm looking for something like this: $geoCodeArray = array([GET=http://pastebin.com/grVsbgL9]); function findHome($geoCodeArray) { // magic return $geoCode; } Ultimately generating something like this: UPDATE: Sample Dataset Here's a map with a sample dataset: http://batchgeo.com/map/c3676fe29985f00e1605cd4f86920179 Here's a pastebin of 150

Why use the SQL Server 2008 geography data type?

怎甘沉沦 提交于 2019-12-02 13:51:00
I am redesigning a customer database and one of the new pieces of information I would like to store along with the standard address fields (Street, City, etc.) is the geographic location of the address. The only use case I have in mind is to allow users to map the coordinates on Google maps when the address cannot otherwise be found, which often happens when the area is newly developed, or is in a remote/rural location. My first inclination was to store latitude and longitude as decimal values, but then I remembered that SQL Server 2008 R2 has a geography data type. I have absolutely no

Google Geocode region works only in certain cases

冷暖自知 提交于 2019-12-02 13:37:40
问题 I think this is a bug and I'm going to find out where to submit it to Google but I figured I'd ask here first in case I'm just doing something wrong or misinterpreting something. I cannot get Google's geocoder to consistently use the region bias. For example the following does work: https://maps.googleapis.com/maps/api/geocode/json?address=boston returns Boston, MA https://maps.googleapis.com/maps/api/geocode/json?address=boston&region=uk returns Boston, Lincolnshire in England However the