1

I've been using this Toner Map by Stamen for a while. I built it using Google Maps. Its been working on multiple sites for the last 5-6 months.

I just checked today as a client complained and they are all broken.

Stamen: http://maps.stamen.com/#watercolor/12/37.7706/-122.3782

Error:

Uncaught TypeError: Object [object Array] has no method 'substr' 

JS Fiddle: http://jsfiddle.net/hnuTt/12/

Javascript:

var layer = 'toner';
var map = new google.maps.Map(document.getElementById('map'),{
    center: new google.maps.LatLng(51.514635,-0.092992),
    zoom: 15,
    mapTypeId: layer,
    scrollwheel: false,
    disableDefaultUI: true,
    mapTypeControlOptions: {
        mapTypeIds: [layer]
    }
});
map.mapTypes.set(layer, new google.maps.StamenMapType(layer));
var marker = new google.maps.Marker({
    position: new google.maps.LatLng(51.499405,-0.390596),
    map: map
});
Kara
  • 6,115
  • 16
  • 50
  • 57
CharliePrynn
  • 3,034
  • 5
  • 40
  • 68
  • I have the same problem on multiple sites as well... – jonas Jun 13 '13 at 09:34
  • Its very annoying. I think it has something to do with a update from Google and not stamen. I'd be interested to know what though. Feel free to spread this question, maybe someone will answer. – CharliePrynn Jun 13 '13 at 09:48
  • Yeah stamens maps are up on their site. Does your sites have anything more in common? All three i have trouble with is on WordPress – jonas Jun 13 '13 at 10:04
  • The ones on their site are using their Map API and not Google Maps API. All of my sites that are broken are using wordpress as well. – CharliePrynn Jun 13 '13 at 10:06

1 Answers1

4

I had exactly the same problem with stamen and other tile providers.

Since yesterday, default Google Maps API loaded (http://maps.googleapis.com/maps/api/js?sensor=false) seems to be version 3.13, which isnt the release version and might contains bugs.

In emergency the solution is to load 3.12 version which is the release version : http://maps.googleapis.com/maps/api/js?v=3.12&sensor=false

I haven't tried yet to find a working solution with 3.13

Radim Köhler
  • 122,561
  • 47
  • 239
  • 335
Jeremie
  • 81
  • 1