maps

display route on iOS 7 maps: addOverlay has no effect

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i want display a point to point route inside my mapView, i use this code for create the route: - (IBAction)backToYourCar { MKPlacemark *sourcePlacemark = [[MKPlacemark alloc] initWithCoordinate:self.annotationForCar.coordinate addressDictionary:nil]; NSLog(@"coordiante : locationIniziale %f", sourcePlacemark.coordinate.latitude); MKMapItem *carPosition = [[MKMapItem alloc] initWithPlacemark:sourcePlacemark]; MKMapItem *actualPosition = [MKMapItem mapItemForCurrentLocation]; NSLog(@"coordiante : source %f, ActualPosition %f", carPosition

cURL error 7: Failed to connect to maps.googleapis.com port 443

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I got following Error when get Distance between two places in Laravel. i use guzzlehttp/guzzle package to get Google Map api response. i previously declare use GuzzleHttp\Client; How to solve this Issue. Error : cURL error 7: Failed to connect to maps.googleapis.com port 443: Network is unreachable (see http://curl.haxx.se/libcurl/c/libcurl-errors.html ) $pickupaddress = urlencode($frmplace); $deliveryaddress = urlencode($destplace); $client = new GuzzleHttp\Client(); $disrequest = $client->get('https://maps.googleapis.com/maps/api

Google Maps API Android v2 - “ACCESS_FINE_LOCATION” permission required with my-location layer enabled

匿名 (未验证) 提交于 2019-12-03 01:09:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to show the location of the user on a Google Maps enabling my-location layer , but this functionality requires the " ACCESS_FINE_LOCATION " permission to get the location from the GPS. Is it possible to prevent the GoogleMap from trying to get the location from the GPS? If I remove the permission " ACCESS_FINE_LOCATION " in the Manifest file, as soon as I try to display the map, the app crashes with the following error: E/AndroidRuntime(28578): FATAL EXCEPTION: main E/AndroidRuntime(28578): java.lang.SecurityException: Client must

Is it OK to use the maps.google.cn API outside of China?

匿名 (未验证) 提交于 2019-12-03 01:09:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Google Maps is available in China per their documentation: The Google Maps APIs are served within China from the domain maps.google.cn. This domain does not support https. When making requests to the Google Maps APIs from China, please replace https://maps.googleapis.com with http://maps.google.cn . I have tested this outside China without any issues, however I can't find any documentation that prohibit developers from using http://maps.google.cn outside of china. Does anyone knows about any restrictions? 回答1: The answer is already stated in

Move google map center javascript api

依然范特西╮ 提交于 2019-12-03 01:08:23
In my project I want to move the center of the map to new coordinates. This is the code I have for the map function initialize() { var mapOptions = { center: new google.maps.LatLng(0, 0), zoom: 4, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions); } function moveToLocation(lat, lng){ var center = new google.maps.LatLng(lat, lng); var map = document.getElementById("map_canvas"); map.panTo(center); } The moveToLocation function does get called but the map does not re center. Any idea what I'm missing? Your problem is that

Android Google Maps V2 - OnInfoWindowClick on several markers

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the code to make one marker start a activity when you click on the infowindow. It works absolutely fine. But when I try to add in another marker and another @override it always opens the last class on all of the Markers infowindows. So in essence all of the markers infowindows open the same activity when clicked instead of opening the separate class that I intended it to. This is the code below that successfully opens 1 activity on InfoWindowClicked. I have called it example.class, this is for everyone that needs this example . public

How to remove polylines of google maps api 3

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can someone tell me why I can't remove my polylines with this code: $("#chkRouteLines").click(function () { var polyline = new google.maps.Polyline({ path: positions, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2, visible: true }); ; if ($(this).is(':checked')) { polyline.setMap(map); } else { polyline.setMap(null); } }) I found in the documentation of google maps api 3 that I need to do: setMap(null).. But this didn't work. Thank you! 回答1: You aren't retaining a reference to the polyline, it is local to the "$("#chkRouteLines"

Google Maps is grey

匿名 (未验证) 提交于 2019-12-03 01:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using google maps in a mobile application using html and javascript. When the I load the map I am only able to see 5% of the map in the upper left corner. 95% of the div container is grey. When I want to check the div with Firebug the whole map is loaded suddenly. What can that be? I tried already several Stackoverflow threads but no solution worked for me. Thank you. Code: var map = new google.maps.Map(document.getElementById('map'), { zoom: 10, center: new google.maps.LatLng(-33.92, 151.25), mapTypeId: google.maps.MapTypeId.ROADMAP })

Null-aware operator with Maps

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I had the same problem with lists , now it is Map . What I would like to do The following syntax is not Dart , as in it does not compile : map ?[ key ] ?? otherValue If my map was not a Map but a List , it would look like Günter pointed out here : list ?. elementAt ( index ) ?? otherValue What I am searching for I understand that map?[key] is not valid syntax and therefore I am searching for something like elementAt , which works for lists, for maps. map ?. valueFor ( key ) ?? otherValue valueOf That does obviously not yet exist.

Can I use Google Maps API in china [closed]

匿名 (未验证) 提交于 2019-12-03 01:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In my company we have developed an android application that uses Google Maps. specifically we use import com.google.android.maps.GeoPoint; import com.google.android.maps.MapView; On very short notice this application will be demoed in China to a Chinese company, and I need to know if we need to replace the map API or not. I have searched the Internet in home of finding a simple Yes or No answer if maps work or not but it's not clear to me. I went to china and used maps in the summer och 2011, but shortly after it seams that maps was blocked.