google-maps-api-3

Syntax for setting draggablecursor property in google maps api

爱⌒轻易说出口 提交于 2019-12-24 04:22:34
问题 I want to change the Draggablecursor for Google Maps to a custom image. I can set it to a name such as "crosshair" or "move" but I cannot get it to work with an image url. I tried every possible syntax I could google, including some which I thought were ridiculously wrong. Among them: var mapOptions = { ... draggableCursor: '../images/mapcursor.jpg', draggableCursor: 'url("../images/mapcursor.jpg")', draggableCursor: 'url(../images/mapcursor.jpg) 20 20, default' , draggableCursor: 'url("http:

Google Maps Javascript API, DirectionsService, list of countries

断了今生、忘了曾经 提交于 2019-12-24 04:09:12
问题 I am creating a route using google.maps.DirectionsService. What would be the best method to get the list of countries the route goes through? I can't find this info in the DirectionsResult https://developers.google.com/maps/documentation/javascript/reference#DirectionsResult 回答1: Each route from the routes array have a overview_path array with all the coordinates. You can geocode each of this coordinates and get the country of it (remember the limitation of geocoding calls!). Isn't the best

Google Maps API Sometimes Not Showing Markers

…衆ロ難τιáo~ 提交于 2019-12-24 04:08:18
问题 I am using Google Maps to display a map with a set of markers on it. The code for the page (slightly simplified) is: <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer

414 Request URI Too Large Error Google Maps v3

邮差的信 提交于 2019-12-24 04:07:27
问题 This error seems to occur when I call the constructor for creating a new KmlLayer with over 15 different KMZ files. The constructor call is: var layer = new google.maps.KmlLayer('http...'); I can replicate this error every time with 15 different KMZ files. I have tried reducing sizes of the files, but it doesn't seem to matter. Once you go for the 16th request to display a polygon from the KMZ, all the requests will fail stating 414 Request URI Too Large. Once this error happens, none of the

Google Maps KML Loading - 414 Request URI too large

微笑、不失礼 提交于 2019-12-24 04:00:33
问题 I am currently building a Google Maps project that will dynamically load and unload various KMZ files based on user input. It works fine for roughly 8 layer loads/unloads, but then Google Maps breaks down with the 414 error. I've traced the problem down to the stored string the API is generating to refer to each KML layer. Here's the code that runs when a layer is clicked: function showLayer(layername) { if (layers[layername].kml === undefined) { layers[layername].kml = loadKML(layers

google maps autocomplete bounces back already cleared text …odd…odd…odd

强颜欢笑 提交于 2019-12-24 03:55:16
问题 I have this odd behavior from Google MAPs autocomplete (or maybe I miss sth)... ideas? The odd: You enter sth into the input, e.g. 'London' You press [ENTER] You press [CLEAR] button You click into the 'input' You click outside the 'input' ....... and voila! The already cleared in step-3 text ('London' in our example) is right-back into the input...Why? And here is the code: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false

Styling standard Zoom control in Google Maps v3

耗尽温柔 提交于 2019-12-24 03:53:10
问题 Is there an easy way to style the Zoom control in Google Maps JavaScript API v3? All what I want is just to change the standard image (http://maps.gstatic.com/intl/en_ALL/mapfiles/mapcontrols3d6.png) to my one without implementing of a custom control. I tried to change it in DOM with JQuery but I cannot find the right place to do this. Any tips would be appreciated 回答1: So we came up with a solution to do the following on the tilesloaded event of Map : var styleZoomControl = function () { var

Styling standard Zoom control in Google Maps v3

六眼飞鱼酱① 提交于 2019-12-24 03:53:06
问题 Is there an easy way to style the Zoom control in Google Maps JavaScript API v3? All what I want is just to change the standard image (http://maps.gstatic.com/intl/en_ALL/mapfiles/mapcontrols3d6.png) to my one without implementing of a custom control. I tried to change it in DOM with JQuery but I cannot find the right place to do this. Any tips would be appreciated 回答1: So we came up with a solution to do the following on the tilesloaded event of Map : var styleZoomControl = function () { var

Why do I get “map.set_center is not a function”?

a 夏天 提交于 2019-12-24 03:44:15
问题 This code have been working until I updated last night. The code works perfectly on my localhost, but I get an error on my test server. The error message (from Firebug) is "map.set_center is not a function" . So why is this not working on my server any more? function googleMapInit() { if (jQuery('#map_canvas').length > 0) { var currentLocation = jQuery('#geomap_ddlCity :selected').text() + ', ' + jQuery('#geomap_ddlCountry :selected').text(); var options = {zoom: 14, mapTypeId: google.maps

how to use islocationOnEdge function to find coordinates on/near a path of google maps api on server side

时光总嘲笑我的痴心妄想 提交于 2019-12-24 03:37:14
问题 this question is an extension to the question on Finding particular cities along your Path but am including all the details. google.maps.geometry.poly.isLocationOnEdge(LatLngOfDbCoordinate,new google.maps.Polyline({path:google.maps.geometry.encoding.decodePath(response.routes[0].overview_polyline)}),0.00001); 1) can i run this above line of code for many(eg:10000) ( LatLngOfDbCoordinate stored in the database) at the server side as javascript inside the php code with Node.JS ? 2) if yes then