Comments (44)
why do we all write this comment "+1" while we have emoticons for each comment (little smiley) ,, that's better solution
from js-marker-clusterer.
@mygod0520 don't change MARKER_CLUSTER_IMAGE_PATH_
, just set the imagePath
option like: var mc = new MarkerClusterer(map, makers, {imagePath: 'images/m'});
!
from js-marker-clusterer.
Just fixed this in Suitecrm. It's caused by images moving to github. To fix it replace every place that has 'https://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/'
with
'https://raw.githubusercontent.com/googlemaps/js-marker-clusterer/gh-pages/images/'
In SuiteCRM/SugarCRM, make sure to only switch the difference in address. E.g. some of the addresses end with /m so keep this on the end of the new URL
from js-marker-clusterer.
Even on simple example https://googlemaps.github.io/js-marker-clusterer/examples/simple_example.html
I get next exception:
Failed to load resource: the server responded with a status of 404 ()
https://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m1.png
and there is no circle markers.
from js-marker-clusterer.
The problem is that our website use the SVN version of the library. This is not a good practice.
Quick (and right) solution:
- Download the GitHub version (zip) and put it local to your website (use _compiled.js for production)
- Reference it from your HTML file
- Download marker cluster icons (here an example..)
cluster.zip - Configure MarkerCluster with the following (or similar) options:
...
if (typeof MarkerClusterer == 'function') {
var mcClusterIconFolder = "/img/cluster";
var mcOptions = {
maxZoom: 11,
styles: [
{
height: 53,
url: mcClusterIconFolder + "/m1.png",
width: 53
},
{
height: 56,
url: mcClusterIconFolder + "/m2.png",
width: 56
},
{
height: 66,
url: mcClusterIconFolder + "/m3.png",
width: 66
},
{
height: 78,
url: mcClusterIconFolder + "/m4.png",
width: 78
},
{
height: 90,
url: mcClusterIconFolder + "/m5.png",
width: 90
}
]
};
markerCluster = new MarkerClusterer(map, mapMarkers, mcOptions);
}
...
Hope this helps.
PS: in any case, current lib must be updated, since images point to old svn path..
from js-marker-clusterer.
Quick fis is:
Pull this project to vendor/marker-clusterer folder
<script src="vendor/marker-clusterer/src/markerclusterer.js"></script>
and edit file markerclusterer.js line 190-192
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ =
'vendor/marker-clusterer/images/m';
from js-marker-clusterer.
@mkdizajn it's because when this post will get 100 '+1' issue will be automatically fixed.
from js-marker-clusterer.
The easiest way to fix this is to simply set the imagePath
when declaring your MarkerClusterer
, like so:
var markerCluster = new MarkerClusterer(map, markers,
{imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
https://developers.google.com/maps/documentation/javascript/marker-clustering
from js-marker-clusterer.
Find there https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m5.png
https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m1.png
from js-marker-clusterer.
I was thinking of markerclusterer.js. But thanks anyway =)
from js-marker-clusterer.
+1
We are getting the same error for the marker clusterer images (404).
It could be good to restore images in the previous url, otherwise we will have to hot fix in production.
from js-marker-clusterer.
+1
from js-marker-clusterer.
the solution:
you can search the key words "MARKER_CLUSTER_IMAGE_PATH_" in the markerclusterer.js
and change the path.
The path must be ended of "m" likes "/img/m" because markerclusterer would re-organize the full path to /img/m+(i+1)+.png
you also could find the image of m1 to m5.png on the internet.
After you doing all these change, restart your server and clean your browser's cookies, and you will see the images.
from js-marker-clusterer.
I've uploaded the markerclusterer.js to my server and set my custom image path. Now my map markers work again. Thanks to the hints given here. ;-)
from js-marker-clusterer.
+1, Why don't you keep previous URL available?
from js-marker-clusterer.
Don't use GitHub as a CDN, just download and include it.
from js-marker-clusterer.
я прямо в файле markerclusterer.js изменил путь к png
вот так:
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../img/gmap/m';
в папку /img/gmap/ предварительно скопировал все png изображения.
все работает и протолок https подсвечен теперь зеленым цветом
from js-marker-clusterer.
Russian detected
from js-marker-clusterer.
Here is an error https://github.com/googlemaps/js-marker-clusterer/blob/gh-pages/src/markerclusterer.js#L191
from js-marker-clusterer.
+1 on this issue...
from js-marker-clusterer.
I've no idea why Google code is down, but if you want to host them on your web server for now change MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_
, lines 192-194 on my markerclusterer.js to you local image path. If anyone finds a better solution or CDN please let me know!
from js-marker-clusterer.
+1
GET http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m2.png 404 (Not Found)
GET http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/m1.png 404 (Not Found)
from js-marker-clusterer.
Does anyone have a local version to share?
from js-marker-clusterer.
+1, please fix this asap.
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/images/ must be back online, otherwise all applications need an update.
from js-marker-clusterer.
+1
from js-marker-clusterer.
+1
from js-marker-clusterer.
+1
from js-marker-clusterer.
+1
from js-marker-clusterer.
+1
from js-marker-clusterer.
+1
from js-marker-clusterer.
+1
Fixed by replacing
Q = 'https://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/m';
to
Q = '/images/markerclusterer/m';
from js-marker-clusterer.
Even easier: Just download the images and use the imagePath
option to set it to your local image path.
from js-marker-clusterer.
+1
from js-marker-clusterer.
+1
from js-marker-clusterer.
fixed by 2f659a3
from js-marker-clusterer.
hamedcrm, thx. it's work for me
from js-marker-clusterer.
The URL given by hamedcrm doesn't work for me. But this worked instead:
https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/[...]
In SuiteCRM I changed files:
/custom/modules/jjwg_Maps/javascript/markerclusterer.js
/custom/modules/jjwg_Maps/javascript/views/view.map_markers.php
from js-marker-clusterer.
Using this URL:
https://raw.githubusercontent.com/googlemaps/js-marker-clusterer/gh-pages/images/
gave me this error:
Cannot execute https://raw.githubusercontent.com/googlemaps/js-marker-clusterer/gh-pages/images/ because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
Instead, I had to use this URL:
http://rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer.js
from js-marker-clusterer.
I agree. Now go tell them http://www.magestore.com/magento-2-store-locator-extension.html and btw that Google Maps doesn't work anymore without an API key. Or instead, tell Google to stop changing their API assuming that the entire world will follow without balking.
from js-marker-clusterer.
@Yonn-Trimoreau I'm not at Google, feel free to tell them yourself.. ^^
from js-marker-clusterer.
@PeterTheOne If only they'd listen LOL
from js-marker-clusterer.
@MrPro100's answer works great. The point of rawgit is to use it as a CDN, but make sure you use the "cdn.rawgit.com" hostname so it gets properly cached. rawgit will block you if you send too much traffic to "rawgit.com".
MarkerClusterer.IMAGE_PATH = "https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m";
from js-marker-clusterer.
xD
from js-marker-clusterer.
excuse me ))
edit file: markerclusterer.js
changed and commented:
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../img/gmap/m';
/** 'http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/' +
'images/m'; */
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';
png icons previously copied to a folder: ../img/gmap/
from js-marker-clusterer.
Related Issues (20)
- Styling clusters HOT 2
- Excluding marker HOT 1
- Polygon on cluster hover HOT 1
- Marker icon display bugs when setting maxZoom with custom icons HOT 1
- Usage with static maps API HOT 1
- Issues with pagespeed insight when loading a page with marker-clusterer HOT 1
- Click/tap on cluster don't work on mobile full screen HOT 1
- SearchBox
- Click on cluster doesn't work on some aspect ratio HOT 4
- Panning the map with the dragging starting on cluster marker provoke a zoom HOT 2
- Marker cluster using geojson HOT 3
- Some png image icons look poor
- How to cluster circle markers?
- Custom OverlayViews always visible. HOT 1
- triggerClusterClick is not captured when running on Android HOT 5
- Wrong cluster icons or don't declustering
- cut icons with box-sizing in css selector *
- Supported repo: googlemaps/v3-utility-library/markerclusterer HOT 1
- clustering not working on zoomout
- googlemap clustered markers do not expand well in Satellite view HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-marker-clusterer.