PDA

View Full Version : ux.gmaps.js



razzaj
2 Jul 2008, 11:42 AM
i just added a couple of usefull properties to the original ux.gmaps.js posted by Shea Frederick:

i have added the following useful properties (for selecting which map view to load and adding zoom + map type at the same time) in ux.gmaps.js:



// add zoom control
if ( this.addZoomControl && this.gmapType === 'map') {
this.gmap.addControl(new GSmallMapControl());
}
//add maptype control
if ( this.addMapTypeControl && this.gmapType === 'map') {
this.gmap.addControl(new GMapTypeControl());
}
// enable map type selection (Normal)
if ( (this.mapType==='normal' | this.mapType==='') && this.gmapType === 'map') {
this.gmap.setMapType(G_NORMAL_MAP);
}
//enable map type selection (Satellite)
if ( this.mapType==='satellite' && this.gmapType === 'map') {
this.gmap.setMapType(G_SATELLITE_MAP);
}


enjoy