google-maps-api-3

Getting KML layer to work locally (e.g. the Google TooManyMarkers Example)

旧街凉风 提交于 2019-12-24 13:32:04
问题 I have copied all of the files for the Google example http://gmaps-samples-v3.googlecode.com/svn/trunk/toomanymarkers/toomanymarkers.html to my PC, but the KML layer does not appear when I tick the checkbox. The files I copied are: functions.js markers.js markers.kml toomanymarkers.html I have also copied these to http://www.performit.co.uk/misc/maps/toomanymarkers/toomanymarkers.html and it doesn't work there either. Am I missing something? Do I need to have an environment set up for the

Google Maps v3 DistanceMatrix/Directions ignore avoidTolls:false

▼魔方 西西 提交于 2019-12-24 13:22:24
问题 I try to find the shortest route from Lone Pine, CA to Yosemite Village, CA . A simple Google Maps lookup reveals two routes: Toll routes: US-395N, CA-120W ~316 km No toll routes: CA-99N ~596 km DirectionService/DistanceMatrixService have an avoidTolls parameter: avoidTolls (optional) — If true, the directions between points will be calculated using non-toll routes, wherever possible. avoidTolls (optional) when set to true indicates that the calculated route(s) should avoid toll roads, if

Google maps taking a long time to render in ie11

一曲冷凌霜 提交于 2019-12-24 13:18:40
问题 The attached HTML renders very quickly in Chrome and Mozzilla browsers. If I try to load it in IE11 I get several timeout errors and after 30 seconds the map finally renders. I have tried all kinds of settings in IE11 with no luck. When I run with developer tools on in debugger mode. I get the error InvalidValueError:not a string in the following function 3 times function wf(a,b){return function(c){if(a(c))return c;throw qf(b||""+c);}}function xf(a){var b=arguments;return function(a){for(var

Google Geocoding - custom marker does not appear

无人久伴 提交于 2019-12-24 13:10:15
问题 I am trying to use the Google Maps API with Geo-coding. The marker's appear in the needed location but only red icon appear, as if the function ignores the icon parameter. Note, I have the same code without Geo-coding and the marker icon's appear as they should, the issue exists only with Geo-coding. Here the code: <!DOCTYPE html> <html> <head> <title>Simple Map</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <style> html, body, #map-canvas

Google maps .setMap issue for IE8

跟風遠走 提交于 2019-12-24 12:51:09
问题 So I've got a bit of a problem here. This script works fine in all browsers apart from IE8 The route() function is called - and is given a Google maps encoded polygon and polyline. The script breaks every time IE8 tries to do setMap I'm thinking the issue is something to do with map being out of its scope? Or a trailing comma error? I just spent the last few hours playing with thisand I couldn't fix it. Any ideas?? Much appreciated. Dont normally like to paste the whole code as it's a bit

Handle different google maps center depending on media query

只愿长相守 提交于 2019-12-24 12:46:52
问题 This is probably really simple to do, I am just not sure how to handle it currently. I am building a site using Foundation 5 as responsive framework and in the footer section there's a map. In the tablet and desktop versions the contact form is positioned over the map with the map visible on both sides of the form element. The mobile version has the map first and the contact form afterwards. To put it graphically it's something like that. Tablet/Desktop Version Mobile Version So, now, in

How to show Google Maps Directions in tabs or div that has display:none

孤人 提交于 2019-12-24 12:34:32
问题 When I'm loading a Google Map (v3) with Directions into a div that is hidden from the user, the resulting map is not zoomed and centered correctly. I tried firing a resize event but that did only partially solve the problem. Usually when loading a map with directions, the API automatically finds the optimal view (ie. zoom level and center) as to show the entire journey. Any ideas what I'm doing wrong? Please see JsFiddle <button id="show">Show</button> <div id="a"> <div id="map_wrapper" style

google api v3 infowindow with multiple markers doesn't work

被刻印的时光 ゝ 提交于 2019-12-24 12:34:15
问题 I'm trying to write on the infowindow content, the record number of my loop. The result is that i read the last record number (10) for each infowindow, and not 1,2,3...10 Someone can help me? Thanks in advance The code is this: function generaMappaMulti() { var CoordinataIniziale = new google.maps.LatLng(44.714957, 10.733647); //set initial coordinate var opzioni = { center: CoordinataIniziale, zoom: 10, mapTypeId: google.maps.MapTypeId.ROADMAP }; //set options to the map map = new google

Geolocation Google Maps Links jQuery

本秂侑毒 提交于 2019-12-24 12:25:09
问题 When I click on a link on the mobile phone, I would like a prompt to ask the user if they would like to allow the location to be detected, and if yes, open Google Maps with the directions starting from their current location to the end destination. This is what I have, but when I click on the link, it goes to the fallback default link. <a class="geo" href="http://maps.google.com/maps?ll=40.822419,-73.993124">Get Directions</a> $("a.geo").click(function(e)) { if (navigator.geolocation) {

Google Maps V3 -> Is it possible to get properties from Geojson using lat lng coordinates or other information from search box?

﹥>﹥吖頭↗ 提交于 2019-12-24 12:04:24
问题 I'm using an external geojson-file to add layers to my Google Map. This file contains two properties per area that I would like to access when searching. I can easily fetch the properties if the user clicks on an area or uses any of the other supported event handlers. https://developers.google.com/maps/documentation/javascript/datalayer#add_event_handlers this.map.data.addListener('mouseover', (event) => { console.log(event.feature.getProperty('VD')); }); However I would like to get what