BIOSTALL / CodeIgniter-Google-Maps-V3-API-Library

The library enables you to create a map and overlay multiple markers, polylines, polygons, rectangles, ground overlays and/or circles, all of which are fully customisable. The library also supports showing directions between two points, including the ability to show the textual directions alongside the map too, and marker clustering. The first stages of integration with the Google Places API are available for use too.
http://biostall.com/codeigniter-google-maps-v3-api-library
288 stars 199 forks source link

Broken link for google maps clustering markers #50

Open rleal-dev opened 8 years ago

rleal-dev commented 8 years ago

http://biostall.com/demos/google-maps-v3-api-codeigniter-library/cluster The above link is broken, and it's getting the following error:

Failed to load resource: the server responded with a status of 404 (Not Found): http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js

A possible solution would be replacing the broken link for this one: line: 1143 //google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js To cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer.js

And line 1852 gridSize: '.$this->clusterGridSize; To imagePath: "https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m", gridSize: '.$this->clusterGridSize;

Thanks

PeterTheOne commented 8 years ago

You don't need to update MARKER_CLUSTER_IMAGE_PATH_, you can just set the imagePath option to the path of the local images.

rleal-dev commented 8 years ago

OK. but the link "http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js" is broken. therefore therefore I changed to "cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer.js" and worked perfectly.

PeterTheOne commented 8 years ago

Github is not meant for hosting images, if something changes your code is broken again. You can do this var mc = new MarkerClusterer(map, makers, {imagePath: 'https://www.mydomain.com/images/m'});, with images in the folder images, named m1.png - m5.png from https://github.com/googlemaps/js-marker-clusterer/tree/gh-pages/images . This is how it was meant to be used.

rleal-dev commented 8 years ago

Understood. I will create a local directory for the images. What about markerclusterer.js what you suggest , let the GitHub link it?

PeterTheOne commented 8 years ago

You can let the github link, I hope it will also be updated in the markerclusterer.js repository.

rleal-dev commented 8 years ago

thanks.