PDA

View Full Version : sencha touch custom styled google map?



rkstar
23 Aug 2011, 12:17 PM
i'm wondering if anyone has been able to do this. i've styled a map to take out all the labels and roads and such in a regular ol' html page, but now i want to port this to a sencha touch app and my logic isn't working with the Ext.Map :



var myStyle = [
{
featureType: "administrative",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
featureType: "poi",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
featureType: "water",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
featureType: "road",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
}
];

var mymap = new Ext.Map({
title : "Our Members Map",
mapOptions : {
center : new google.maps.LatLng(50, 20),
zoom : 4,
minZoom : 4,
maxZoom : 4,
styleHtmlContent : true,
disableDefaultUI : true,
disableDoubleClickZoom : true,
mapTypeControlOptions: {
mapTypeIds: ["mystyle", google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.TERRAIN]
},
mapTypeId : "mystyle"
}
});

mymap.mapTypes.set('mystyle', new google.maps.StyledMapType(myStyle, { name: 'My Style' }));


when i take out the "mapTypes.set()" line and all the mapTypeId references, my map is displayed. when that stuff is in there i get a blank page.