geocode

Geocoding with Google Maps API - updating existing marker rather than adding another

折月煮酒 提交于 2019-12-01 22:27:44
问题 How, when geocoding, can you simply move an existing marker to the result of a new geocode result. Let's take this example: When the map loads, a marker appears When someone geocodes, the marker moves to the result The marker is draggable, so the user can further move the marker (if they want to) Perhaps they want to re-geocode a location, so the new result should automatically move the existing marker. In this sample: https://google-developers.appspot.com/maps/documentation/javascript

Geocoding with Google Maps API - updating existing marker rather than adding another

我与影子孤独终老i 提交于 2019-12-01 21:20:35
How, when geocoding, can you simply move an existing marker to the result of a new geocode result. Let's take this example: When the map loads, a marker appears When someone geocodes, the marker moves to the result The marker is draggable, so the user can further move the marker (if they want to) Perhaps they want to re-geocode a location, so the new result should automatically move the existing marker. In this sample: https://google-developers.appspot.com/maps/documentation/javascript/examples/geocoding-simple ...a new marker is drawn for every new geocode. Does that make sense? Thanks!!! -m

Google Maps API InfoWindow not Displaying content

好久不见. 提交于 2019-12-01 16:53:35
My Code looks like this: var map = /*some google map - defined earlier in the code*/; var geocoder = new google.maps.Geocoder(); var address = 'Some Address, Some Street, Some Place'; geocoder.geocode({'address':address},function(results,status){ if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var infobox = new google.maps.InfoWindow({ content: 'Hello world' }); for(i in results){ var marker = new google.maps.Marker({ map: map, position: results[i].geometry.location }); google.maps.event.addListener(marker, 'click', function() { infobox.setContent(

Google Maps API InfoWindow not Displaying content

こ雲淡風輕ζ 提交于 2019-12-01 14:45:19
问题 My Code looks like this: var map = /*some google map - defined earlier in the code*/; var geocoder = new google.maps.Geocoder(); var address = 'Some Address, Some Street, Some Place'; geocoder.geocode({'address':address},function(results,status){ if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var infobox = new google.maps.InfoWindow({ content: 'Hello world' }); for(i in results){ var marker = new google.maps.Marker({ map: map, position: results[i]

GMaps JS Geocode: Using/Passing Variables With Asynchronous Geocode Function?

拈花ヽ惹草 提交于 2019-11-30 15:34:16
I have an array list of location objects, and I am using some of them to build a full address, and then geocode that. Once I receive the OK status I am then placing a marker on the map. This all works fine. However, now I would also like to place an info window on each marker with another property from my array list, LocationName. Code is here: function placeMarkers(myObjList){ var geocoder = new google.maps.Geocoder(); for(var i=0; i<myObjList.length; i++){ var fullAddress = myObjList[i].Address + ", " + myObjList[i].City + ", " + myObjList[i].State + ", " + myObjList[i].Zip; /* The variable

How to call google map geocode service with jquery ajax

允我心安 提交于 2019-11-30 11:44:31
I'm trying to get the LatLng from google map geocode api. my code is below with address values is "New York, NY" $.ajax({ url: 'http://maps.googleapis.com/maps/api/geocode/json', data: { sensor: false, address: address }, success: function (data) { alert(data) } }); But I'm not getting any values in alert. Thanks for any help. Fokko Driesprong You will need to contact the API regarding the rules . $.getJSON( { url : 'https://maps.googleapis.com/maps/api/geocode/json', data : { sensor : false, address : address }, success : function( data, textStatus ) { console.log( textStatus, data ); } } );

Convert lat/long to pixel X&Y co-ordinates

China☆狼群 提交于 2019-11-30 10:48:02
This type of question seems to have been asked numerous times but none of the solutions posted get me anywhere near the answer I need. I have this map of Northland, New Zealand and I'd like to map Lat/Long values to x/y (pixel) values on this image (http://i.stack.imgur.com/3ok4O.gif - which is 400px square) Right now I do not know the precise lat/long boundaries of this image, but I do have some example data which should be useful to someone who knows what they are doing. LAT LONG X Y -35.3989854471 173.504676819 192.92777494 196.760481649 -35.2647882735 174.121499062 271.426291418 176

unable to get administrative_level_1 information for border areas in india

安稳与你 提交于 2019-11-30 09:56:58
问题 Using the google geocode API I am unable to get administrative_level_1(state) information for location on border of India (Kashmir, Arunachal Pradesh, ...). Can anyone help me with this? 回答1: see issue 8450 in the issue tracker from that issue: http://en.wikipedia.org/wiki/List_of_territorial_disputes In disputed areas, geocoding results have no country (and sometimes no administrative_area_level_1). Reverse geocoding for disputed areas returns no results (e.g. 34.0836581,74.7973681). There

Geocoder autocomplete in android

时光毁灭记忆、已成空白 提交于 2019-11-30 06:54:21
I've been googling my ass of trying to find someone that are having the same problem as me, without luck. So here's my problem: I'm trying to implement a autocomplete suggestion of addresses as the user types the name of a place using the geocoder in Android. I want this to behave much the same as the javascript version using a combbox. I am using a layout with an AutoCompleteTextView, and an arrayadapter to dynamically update the suggestionlist as the user types. I have added a 500ms delay from when the onTextChanged() event is received before a call to the geocoder.getFromLocationName is

unable to get administrative_level_1 information for border areas in india

☆樱花仙子☆ 提交于 2019-11-29 18:10:37
Using the google geocode API I am unable to get administrative_level_1(state) information for location on border of India (Kashmir, Arunachal Pradesh, ...). Can anyone help me with this? see issue 8450 in the issue tracker from that issue : http://en.wikipedia.org/wiki/List_of_territorial_disputes In disputed areas, geocoding results have no country (and sometimes no administrative_area_level_1). Reverse geocoding for disputed areas returns no results (e.g. 34.0836581,74.7973681). There is work underway to make reverse geocoding work in disputed areas. 来源: https://stackoverflow.com/questions