View Full Version : Setting Google map style type

30 Jan 2012, 9:48 AM

I've tried for a few hours now to set the default style of my google map to Terrain before load, and I'm not having much luck. At the moment it display roadmap view, and in the top right I have the options for satellite and terrain, which work when clicked. However, I'd like to set the default to Terrain on load, as this map looks nicer.
I've tried the below but it didn't work, does anyone have any tips?

tabletStartupScreen: 'images/tablet_startup.png',
phoneStartupScreen: 'images/phone_startup.png',
icon: 'images/icon.png',
glossOnIcon: false,
onReady: function()
map = new Ext.Map({
title: 'Map',
getLocation: true,
mapOptions: {
zoom: 2,
mapTypeId : google.maps.MapTypeId.TERRAIN
listeners: {
maprender: function(mapC, map) {

I also tried the syntax from this post, but that didn't work either:


T (http://www.sencha.com/forum/showthread.php?110071-Google-map-Styled-Maps&)hanks,


30 Jan 2012, 9:59 AM
I worked it out by accident by adding the navigationControl: false code here!

mapOptions: {
zoom: 2,
mapTypeId : google.maps.MapTypeId.TERRAIN,
navigationControl: false
listeners: {