Closed dgmstuart closed 12 years ago
Sorry for the delay, just dived into this.
The issue stems from the google maps api version I'm using: 3.8.
The layer you want exists in 3.9 but I didn't check 3.9 full compatibility yet.
At first glance you could simply change 3.8 to 3.9 here https://github.com/apneadiving/Google-Maps-for-Rails/blob/master/lib/gmaps4rails/view_helper.rb#L8
That's great! Thanks so much for looking into this.
I'm being lazy and using 2.0.0.pre to include this, but it's working fine. Thanks again.
When I try and load the google maps Transit layer I get
Uncaught TypeError: undefined is not a function
in relation tovar layer = new google.maps.TransitLayer();
.BicyclingLayer()
andTrafficLayer()
work correctly: those layers are loaded onto the map.This may well be an issue with the maps API rather than the gem (or just a failure in my JS skills), but I can't find anything about issues with this layer and I thought it was worth checking whether there might be some conflict in the gem (?).
Can anyone reproduce this?
Here's my view:
The following DO work:
var layer = new google.maps.BicyclingLayer();
var layer = new google.maps.TrafficLayer();
The area I'm looking at is this: http://swingoutlondon.co.uk/map
Great gem by the way - really helped clean up my code a lot.