herearemypersonalprojects / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

MarkerCluster pulls images from http:// path even if running under https #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following line in markerclusterer.js has a hard-wired path for marker 
images:

MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ =
    'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/' +
    'images/m';

When running the library over https (in order to embed maps in https-secured 
pages), pulling images from an http path will throw security errors to the 
console.  That also triggers security alerts in the lock icon in Chrome (I 
don't see it in Safari).

The image path ought to be reflect the http/https setting from where the 
library was loaded.

Original issue reported on code.google.com by jason....@infogroup.com on 22 Sep 2011 at 9:37

GoogleCodeExporter commented 9 years ago
This is just a convenient default value which will work for most maps.

If the default is not appropriate for your needs (because you are using https 
protocol) you can simply set up your own styles array in the 
MarkerClustererOptions object passed to the MarkerClusterer constructor. Set 
the url values in the styles array to the image files accessed using the https 
protocol.

Original comment by garylitt...@gmail.com on 22 Sep 2011 at 10:15

GoogleCodeExporter commented 9 years ago
Note that you could also get things to work by setting the imagePath property 
in the MarkerClustererOptions object to

"https://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer
plus/images/m"

assuming that you want to use the default cluster icon set.

Original comment by garylitt...@gmail.com on 22 Sep 2011 at 10:29

GoogleCodeExporter commented 9 years ago
That helped me. Thanks!

Added imagePath: 
"https://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer
plus/images/m" to mc options.

Original comment by ClayHick...@gmail.com on 5 Feb 2015 at 5:11