Google Maps markers not showing on Internet Explorer - google-maps

I have a google map that adds multiple markers on it and the InfoWindow contains some custom html in it. (here is a live example)
The map and its markers show fine in all browsers except Internet Explorer. The markers never show. However, the funny thing is, if I press F12, get in developer mode to try to figure out what is going on, the markers show just fine. Then I exit developer mode and it still shows just fine.
Has anyone else ran into a similar situation? I have no idea what to do to make the marker show the first time. (I tried adding a timeout to give the maps time to load before adding the markers, but that didn't work)

Simple answer, not intuitive. Comment out console.log in the file /static//places/js/google_maps.js. I tested in IE 9.

In my case the problem was that the link to create the marker is not found in IE:
new google.maps.MarkerImage("http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|");
I changed that link for that, and found it!
new google.maps.MarkerImage("http://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|");
Note the difference in the base URL.

Related

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

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 correctly.
I used this as exemple for my code : https://developers.google.com/maps/documentation/javascript/examples/layer-data-dynamic
Here is my JSFiddle : https://jsfiddle.net/fmarrot/k7b57egw/ (the data can be seen in console.log(Config.polygon) (line 10)
Indeed if i comment line 29 to 31, no problem at all, but I can't change polygon opacity anymore.
map.data.addListener('click', function(event) {
event.feature.setProperty('opacity', (event.feature.getProperty('opacity')===0.5?0.9:0.5));
});
Any idea of what I am doing wrong ?
Thanks for your help !
Ok I think I figured out, it seems to be a Chrome bug (my version 58.0.3029.110 (64-bit)), I've just tested it with Firefox, Edge and IE with no problems > no polygons duplications on polygon click and works like a charm !
I am gonna wait for a chrome fix or if someone have a solution I would appreciate any suggestions !
UPDATE
As stated in Google issue tracker, the issue was fixed in Chrome 60. The corresponding bug was marked as Fixed on August 9, 2017.
https://buganizer.corp.google.com/issues/38211242

Sending route to Google Map via q attribute

I have a link that opens Google Map with the q attribute like this example
https://maps.google.com/maps?q=a+to:+b+to:+c
The problem is that it doesn't work when people have accepted the newest version of Google Map, but it works with the old one.
Is there a way to force a version or a work around so that it works with both versions?
I just tried to make some directions up, and it seems like the format now is https://www.google.com/maps/dir/a/b/c

Google Maps disable directions and display map directly

I have searched on the internet to find out solution to this issue but i found nothing.
I have following address:
https://maps.google.com/maps?q=2755+Maple+Avenue,+North+Bellmore,+NY+11710&daddr=2755+Maple+Ave,+North+Bellmore,+NY+11710&oe=utf-8&client=firefox-a&channel=fflb&hnear=0x89c27ef151e2fa7d:0x2fde552872337fca,2755+Maple+Ave,+North+Bellmore,+NY+11710&gl=us&t=h&z=16
open in new window
When i click on above link in a mobile browser it opens a new page but instead of mapview it shows me directions panel, any one guide me how can i get rid of directions and display only mapview directly?
i have found a parameter dir=0 but i dont know where to use it.
any help would be appreciated.
https://maps.google.com/maps?q=2755+Maple+Ave,+North+Bellmore,+NY+11710&hl=en&sll=40.684429,-73.529315&sspn=0.010983,0.026157&t=h&gl=us&hnear=2755+Maple+Ave,+North+Bellmore,+New+York+11710&z=16
use this in your map may be its helpful for you

Large number of Google Map Markers and IE6?

I'm working on an application that generates a large number of Google Map markers (2000 - 7000) via JSON. I'm also using MarkerCluster. It works quick on Chrome and FF but IE6 takes few minutes and just crashes the first time I try to zoom in.
I'm not doing any more than just adding the markers to a map using JQuery & GMap API. So I looked at the following URL of the regular Google Map.
http://maps.google.co.uk/maps?f=q&source=s_q&hl=en&q=hotel&sll=53.182996,-2.581787&sspn=1.494529,4.927368&ie=UTF8&split=1&rq=1&ev=p&hq=hotel&hnear=&ll=53.123702,-2.730103&spn=1.496594,4.927368&t=h&z=8
It shows a lot of tiny markers (~1000) and works fine on IE6. Do you have any ideas why this works and the markers added via the API struggles?
Thanks
Having thousands of markers coming out of your program does not sound like it is going to be very friendly for anyone with an older machine.
MarkerCluster doesn't actually reduce the number of markers on the map. It just groups them.
I would recommend implementing a clustering algorithm on the backend so that the number of markers to be shown on the map is reduced.

Google infowindow is not displaying correctly using their API

I am using the Google map API to integrate the map into my website, I am using custom markers and infowindows. I have used this previously with no worries but now, when I click on my marker, the infowindow displays incorrectly.
I have tried to many different things to try and fix it but I just can't seem to figure out whats going on.
here is an image, I can't attach it to the post since I am new and all that.
http://i47.tinypic.com/xbwmbq.png
Any help would be muchly appreciated.
Thanks
Did you change your DOCTYPE recently? I once had the infowindow start doing funny things like that when I switched to a different DOCTYPE.
Well, I thought I had fixed it, but it turns out I didn't. To fix it I had to turn the the dreaded iframe. Sadly, it will have to stay that way until I find a better fix.