MapType .maxZoom is a required property for base MapTypes: http://code.google.com/apis/maps/documentation/v3/reference.html#MapType
.maxZoom has no effect for overlay MapTypes, which is why the traffic example worked as-is but failed when you set traffic as the base MapType. On Wed, Apr 21, 2010 at 11:03 AM, Alon Salant <[email protected]> wrote: > I am trying to add a new MapType (not an overlay) with my own tiles. > Using the example code at > http://code.google.com/apis/maps/documentation/v3/overlays.html#ImageMapTypes > and providing my own getTileUrl function, my image tiles render great > as an overlay. > > However, I want a new MapType not an overlay. My understanding (from > > http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeRegistry > ) > is that I should be adding the ImageMapType to Map.mapTypes with: > > map.mapTypes.set('ID', myImageMapType); > > This results in the JavaScript error "Expected value implementing > google.maps.MapType" > > You can reproduce this error by using the traffic example at > > http://code.google.com/apis/maps/documentation/v3/overlays.html#ImageMapTypes > and replacing: > > map.overlayMapTypes.insertAt(0, trafficMapType); > > with > > map.mapTypes.set("traffic", trafficMapType); > > This implies that you can't use ImageMapType as a standalone MapType > or I've misunderstood something along the way. > > Any insights? > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
