0

I am using key draggable zoom and markers cluster libraries from google map utility. I cannot load the source script for these two libraries from this afternoon. It seems all google map utility svn references are down. Any ideas?

MC X
  • 337
  • 4
  • 16

2 Answers2

2

See this question on SO. The google maps utility library is being moved to github. You can still browse the code, but you cannot checkout svn.

Community
  • 1
  • 1
Matej P.
  • 5,303
  • 1
  • 28
  • 44
1

In your case the following script urls cover the keydragzoom library (standard and packed versions):

https://cdn.rawgit.com/googlemaps/v3-utility-library/master/keydragzoom/src/keydragzoom.js
https://cdn.rawgit.com/googlemaps/v3-utility-library/master/keydragzoom/src/keydragzoom_packed.js

And the following covers the markerclusterer (standard and compiled):

https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer.js
https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/src/markerclusterer_compiled.js

You'll also need to specify the imagePath option when instantiating your MarkerClusterer to access the images from GitHub:

var mc = new MarkerClusterer(map, markers, { 
    imagePath: 'https://cdn.rawgit.com/googlemaps/js-marker-clusterer/gh-pages/images/m' 
});

The above approach, of specifically setting the imagePath location, is required because the MarkerClusterer library currently still contains (at the 13th of May 2016) the following hard-coded reference to the decommissioned location:

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

In production, the above urls (with the cdn prefix) should be used as they have no traffic limits or throttling and the files are served via a super fast global CDN. However please bear in mind that, as a free service, it offers no uptime or support guarantees.

Accessing files hosted from Git is covered in more detail in the following SO answer:

Link and execute external JavaScript file hosted on GitHub

Community
  • 1
  • 1
Chris Cook
  • 2,821
  • 1
  • 20
  • 32