google-maps-api-3

kmlLayer causing focus to change (google map api v3)

自作多情 提交于 2019-12-24 00:56:27
问题 I'm layering NOAA radar information over a map with a focus of 8. When the page loads, the map initially renders at 8, then immediately redraws itself to show an entire region. The KML file I'm using contains min/max lat/long coordinates which are used to draw the radar image (in this case over the southeast US area). If I change those coordinates to cover a smaller area, the google map is resized like I want, but radar activity is clipped per the KML file. This is a problem if users zoom out

Not getting json response in google query of longitude and latitude in iOS?

北城以北 提交于 2019-12-24 00:52:20
问题 I am new to iOS, so if any help it will be appreciated. I am trying to get the longitude and latitude from address, earlier the code was working fine but now the JSON data are coming null. Here my sample code, url = [NSString stringWithFormat:@"http://maps.google.com/maps/api/geocode/json?address=%@&sensor=false",appDelegate.sAddress]; url=[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; NSLog(@"Address URL: %@",url); //Formulate the string as a URL object. NSURL

Google map leave by time

那年仲夏 提交于 2019-12-24 00:48:51
问题 I am currently trying to figure out if there is a way to calculate what is the best time to leave by in order to reach my destination using google maps api. example: San Francisco -> Menlo Park ArrivalTime: 12pm CurrentTime: 11:00am Leave by time: 11:30am Currently distancematrix api seems to fit my needs; however, setting the arrival time or departure time does not give a response with when to leave. So I am wondering, if I am missing something or is there another api within google that can

Google maps API, get the users city/ nearest city/ general area

一世执手 提交于 2019-12-24 00:45:14
问题 I've been trying to code a function that returns the most reasonable, moderately sized city/ town/ region a person is in or near. Apps such as yik yak used an algorithim like this to group people together. Is there any existing alogorithims to do this? At the moment I'm using this: geocoder.geocode({'latLng': latlng}, function (results, status) { var city = 'Unknown'; if (status == google.maps.GeocoderStatus.OK) { var details = results[0].address_components; for (var i = details.length-1; i >

Having trouble clearing (deleting) dynamically created polyline before displaying another

試著忘記壹切 提交于 2019-12-24 00:31:29
问题 I am having trouble clearing any existing polylines before displaying a new one. I've already tried more than 5 different methods (array length = 0, MVCArray clear, polylines.setMap(null), etc) that I found on the web. I am using google maps V3, and here's the code from my js file // initialize the google map var latlng = new google.maps.LatLng(37.775, -122.418333); var myOptions = { zoom: 11, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document

Get nearby places from a custom markers

谁说胖子不能爱 提交于 2019-12-24 00:24:59
问题 I have a list of markers and would like to get the nearby place using my list of markers. I have tried checking it here but it is not clear as to how they solve the problem. The following is my code that I've implemented so far: public class LocationMapsNearby extends FragmentActivity implements OnMapReadyCallback { private static final LatLng JOHANNESBURG = new LatLng(-26.196908, 28.042179); private static final LatLng CAPETOWN = new LatLng(-33.971294, 18.602129); private static final LatLng

InfoWindow showing in wrong place

◇◆丶佛笑我妖孽 提交于 2019-12-24 00:13:41
问题 I have little problem with my webpage. When I'm trying to show InfoWindow on marker. That windows shows on the top left corner of a map instead of on the marker. Just like in screen below: Here is my script I use for placing markers and using InfoWindows. var infowindow; function point(name, lat, long) { var self = this; self.name = name; self.lat = ko.observable(lat); self.long = ko.observable(long); var marker = new google.maps.Marker({ position: new google.maps.LatLng(lat, long), title:

Google maps API doesn't work in safari

[亡魂溺海] 提交于 2019-12-23 23:39:01
问题 hello im hosting Google maps API on my localhost for now, and it appears fine in Chrome and the mobile phone version. (both safari and chrome iPhone versions). My problem is Google maps doesn't show when it comes to my Mac version of Safari. the Grey(background) shows and the cursors change to the Google maps cursor, but the map and content doesn't display. what can be the problem? Here is a link to the map. as you can see the map displays in Chrome but not in safari.(at least not for me).

Google Map Data Layer, click on polygon and change opacity (Chrome Bug)

只谈情不闲聊 提交于 2019-12-23 23:22:15
问题 I have a google map where I load geometry data* to the data layer using addGeoJson. Everything works fine until i tried to bind an event on polygons in order to change opactiy settings. *I retreive city borders from OSM to draw polygons, I think my json object is well formatted, I took Google as reference : https://storage.googleapis.com/mapsdevsite/json/google.json As soon as I click on a polygon (any of them), it seems to duplicates my polygons anywhere around however the opacity change

How do I change/customize the icon for the pegman on Google Maps?

别来无恙 提交于 2019-12-23 22:48:25
问题 I have searched around stackexchange, but I only found questions/answers for changing the location of the pegman. Is there a way to change the source image for it? I have tried affecting the style like this: #map-canvas > div > div:nth-child(8) > div:nth-child(2) > div:nth-child(4) > img:nth-child(1) { background:url(images/man.jpg); } but it's not showing any changes. I can't seem to find it here either: https://developers.google.com/maps/documentation/javascript/reference#StreetViewService