Thanks to Martin.  Perhaps this will help someone in the same
situation as me.
I created similar code to the section (below) from the Google API V3
Map Types documentation, and it allowed me to set the custom tiles as
the
base layer.  The key was to create my own map type first.

http://code.google.com/apis/maps/documentation/javascript/maptypes.ht...
"
var gallPetersMapType = new google.maps.ImageMapType({
    getTileUrl: function(coord, zoom) {
      var numTiles = 1 << zoom;

      // For simplicity, we use a tileset consisting of 1 tile at zoom
level 0
      // and 4 tiles at zoom level 1.
      var baseURL = 'images/';
      baseURL += 'gall-peters_' + zoom + '_' + x + '_' + coord.y +
'.png';
      return baseURL;
    },
    tileSize: new google.maps.Size(800, 512),
    isPng: true,
    minZoom: 0,
    maxZoom: 1,
    name: 'Gall-Peters'
  });

  gallPetersMapType.projection = new GallPetersProjection();

  var mapOptions = {
    zoom: 0,
    center: new google.maps.LatLng(0,0)
  };
  gallPetersMap = new
google.maps.Map(document.getElementById("gallPetersMap"),
      mapOptions);

  gallPetersMap.mapTypes.set('gallPetersMap', gallPetersMapType);
  gallPetersMap.setMapTypeId('gallPetersMap');
  gallPetersMap.overlayMapTypes.insertAt(0, gallPetersMapType);
..."

On May 13, 1:22 am, Martin™ <warwo...@gmail.com> wrote:
> Look at the documentation:
>
> http://code.google.com/apis/maps/documentation/javascript/maptypes.ht...
>
> I think you need to create a 'base map type' and not an 'overlay map
> type'.
>
> Martin.
>
> On May 13, 3:05 am, "Tom R." <abacus...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hello All-
>
> > I found no clear mention of this on the forum so far.  I'm able to
> > display my custom tiles using the following portions of JS code:
>
> > // ...etc
> > customlayer = map.overlayMapTypes.insertAt(0, new
> > google.maps.ImageMapType({
> >       getTileUrl: function(coord,zoom) {
> >         var baseURL = 'maptiles/';
> >         baseURL += 'preciprelief/' + zoom + '/' + coord.x + '/' +
> > (Math.pow(2,zoom)-coord.y-1) + ".png";
> >         return baseURL;
> >       },
> >       tileSize: new google.maps.Size(256, 256),
> >       isPng: true,
> >       minZoom: 7,
> >       maxZoom: 12
> >       })
> >     )
>
> > //...etc
> > customlayer.setMap(map);
>
> > But how do I toggle between the default Google road map and my
> > customer tiles so that only mine are visible?  Or, in other words, how
> > do I turn off the Google tiles, perhaps using a variable linked to a
> > custom drop-down menu?
>
> > Thanks in advance.  I hope this helps someone else in the future.
>
> > Cheers
> > Tom

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to