Hola gente de NeoTeo.
Bueno, he añadido algunos métodos más... de momento tal vez no entenderán cómo usar la clase aún pero más adelante, cuando ya tenga un poco más de forma, aspiro hacerles un pequeño tuto de cómo usar este script.
En mi caso, cada marca en el mapa apuntará a un recorrido 360º.
¿Qué colgarán ustedes? 
Código:
/*********************************** GoogleMapCreator Class **********************************/
var GoogleMapCreator = new Class({
Implements: [Options, Events],
options: {
size: {
width: '100%',
height: '100%'
},
zoom: 6,
center: {
lat: 7.6,
lng: -74
},
mapTypeId: 'ROADMAP'
},
initialize: function (mapContainer, options) {
this.mapContainer = mapContainer;
this.setOptions(options);
this.mapConfig();
this.createMap();
},
mapConfig: function () {
this.mapOptions = {
zoom: this.options.zoom,
center: this.createLatLng(this.options.center.lat, this.options.center.lng),
mapTypeId: this.options.mapTypeId.toLowerCase()
};
},
createMap: function() {
this.mapContainer.setStyles({
width: this.options.size.width,
height: this.options.size.height
});
this.mapObj = new google.maps.Map(this.mapContainer, this.mapOptions);
},
/**************************************************************
API BASE CLASSES
**************************************************************/
createLatLng: function (latitude, longitude) {
latlng = new google.maps.LatLng(latitude, longitude);
return latlng;
},
/**************************************************************
MAP CLASS (Google Maps API Class)
**************************************************************/
/*------------------------- METHODS -------------------------*/
setCenter: function(latLng) {
center = [latLng, this.getCenter()].pick();
this.mapObj.setCenter(latLng);
},
getCenter: function() {
center = this.mapObj.getCenter();
return center;
},
setZoom: function(zoomLevel) {
// Google API will convert IT downwards to the nearest integer.
zoomLevel = [zoomLevel, this.getZoom()].pick();
this.mapObj.setZoom(zoomLevel);
},
getZoom: function() {
zoomLevel = this.mapObj.getZoom();
return zoomLevel;
},
setMapType: function(mapType) {
mapType = [mapType.toLowerCase(), this.getMapType].pick();
this.mapObj.setMaypTypeId(mapType);
},
getMapType: function() {
mapType = this.mapObj.getMapTypeId();
return mapType;
},
getBounds: function() {
bounds = this.mapObj.getBounds();
return bounds;
},
panTo: function(latLng) {
latLng = [latLng, this.getCenter()].pick();
this.mapObj.panTo(latLng);
},
panToBounds: function(latLngBounds) {
latLngBounds = [latLngBounds, this.getBounds()].pick();
this.mapObj.panToBounds(latLngBounds);
},
setMapOptions: function(mapOptions) {
mapOptions = [mapOptions, this.mapOptions].pick();
this.mapObj.setOptions(mapOptions);
}
});
/*********************************** /GoogleMapCreator Class **********************************/