maps

Google Maps API V3: fromContainerPixelToLatLng

匿名 (未验证) 提交于 2019-12-03 02:22:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm currently working on a project that requires that I have a div stacked above a Google Map. However, I need to pass the mousemove event of the div to the Map. To do that, I need to find the LatLng co-ordinates from the map container pixel co-ordinate (since triggering the Maps mousemove event requires the LatLng co-ordinates). Is there any other way to pass the mousemove event from the div to the map, and if not, how do I go from the Map container co-ordinates to LatLng. I read that doing so requires creating a dummy overlay, and then

Maps API keys for geocoding not working anymore?

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: It seems that the generated keys in the Google API's console are not working anymore. With different keys (tried it with both server and browser key, however the server key is what I need), generated from different accounts I get constantly the following errors: Error when using server key: { "error_message" : "This site or IP is not authorized to use this API key." , "results" : [], "status" : "REQUEST_DENIED" } Error when using browser key: { "error_message" : "The provided API key is expired." , "results" : [], "status" :

Google Maps API - detect when crossing state lines and calculate distance travelled in each state

匿名 (未验证) 提交于 2019-12-03 02:16:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using google maps api to calculate the number of miles my company's vehicles travel in each state over a period of time. For trips taken over the period, the user will create routes on the map, and the program should be able to generate some output like: 'Maryland: 100 miles, Virginia: 500 miles", etc. I'm pretty sure I can do it by sending a DirectionsService request and iterating over the response.routes[i].legs[i].steps[i].path array, but unfortunately this requires sending Geocoder requests on thousands of LatLng s, which quickly

Google Maps kml files

匿名 (未验证) 提交于 2019-12-03 02:15:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: If I use an embeded google map in my website, will the data contained in an kml displayed be publicly viewable? Will it be possible for the user to access just the data displayed (i.e., not the user interface) or would I have to provide that separately? 回答1: If you load your KML through the API, with GGeoXml(), (V2), or KmlLayer(), (V3), then your data needs to be in a public server because it is parsed by Google's servers and they need to be able to get to it. If you load it with a third party extension then you can keep it

Source maps with grunt

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Do you know of a workflow that includes source maps for an app compiled with grunt? I am well aware of plugins like uglifyjs that allow you to simply generate a source map. But I'm looking for incorporating this into a more complex workflow, rather than just making a one-off source map. I've noticed that the most popular Yeoman generators (that I know of) are missing source maps in their workflows. Is this just because of a lack of support in the major plugins for source maps? Or is it instead that source maps aren't necessary in work flows,

Save current Google Map as image

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I save the current google map as an image? Below is the Javascript I use to initialize the map. var myMarker = new google.maps.LatLng(result[0].centerLat, result[0].centerLong); var myOptions = { disableDoubleClickZoom: true, zoom: result[0].zoom, center: myMarker, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); I had a look at https://developers.google.com/maps/documentation/javascript/reference#Map but there seems to be no method that returns a URL or

Google MAP API Uncaught TypeError: Cannot read property 'offsetWidth' of null

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to use Google MAP API v3 with the following code. Topology */ /*--> */ /*--> */ /*--> */ /*--> */ When I run this code, the browser says this. Uncaught TypeError: Cannot read property 'offsetWidth' of null I have no idea, since I follow the direction given in this tutorial . Do you have any clue? 回答1: This problem is usually due to the map div not being rendered before the javascript runs that needs to access it. You should put your initialization code inside an onload function or at the bottom of your HTML file, just before the

Creating a multi color svg icon for google map marker

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to add a svg icon to the google map marker. Right now i am able to create a svg icon by a single path, Please find the code below: var car = "M17.402,0H5.643C2.526,0,0,3.467,0,6.584v34.804c0,3.116,2.526,5.644,5.643,5.644h11.759c3.116,0,5.644-2.527,5.644-5.644 V6.584C23.044,3.467,20.518,0,17.402,0z M22.057,14.188v11.665l-2.729,0.351v-4.806L22.057,14.188z M20.625,10.773 c-1.016,3.9-2.219,8.51-2.219,8.51H4.638l-2.222-8.51C2.417,10.773,11.3,7.755,20.625,10.773z M3.748,21.713v4.492l-2.73-0.349 V14.502L3.748,21.713z M1.018,37

Google Map Api Invalid Value Error

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I have created the following code using Google Maps API that should make a direction line on Google Maps between two given addresses. My Code is: function initMap () { var map = new google . maps . Map ( document . getElementById ( 'map' ), { zoom : 8 , center : { lat : - 34.397 , lng : 150.644 } }); var directionsService = new google . maps . DirectionsService (); var directionsDisplay = new google . maps . DirectionsRenderer ({ map : map }); var geocoder = new google . maps . Geocoder (); var pointA , pointB ; geocoder . geocode

Google Maps V2 - Error inflating class Fragment

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying my hand and Android Application Development. I'm currently using Eclipse (I can't remember the version, whatever the newest is). I've crossed a bridge where I just can't seem to grasp what I'm doing wrong. I'm attempting to use the Google Maps V2 API. I've been through several documents and tried several techniques, all of which lead to the same error: Android.view.Inflate Exception: Binary XML file line #2: Error inflating class fragment I've been pounding my face into the keys for 2 days straight trying to grasp what I'm doing