$(document).ready(initializeMap_gm_76121);
var map_gm_76121;
var markers_gm_76121 = [];
var openedInfoWindows_gm_76121 = [];
function initializeMap_gm_76121(){
var latlng = new google.maps.LatLng(20.44291, -97.31939);
var myOptions = {
zoom: 19,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: false,
mapTypeControl: false,
scrollwheel: false,
zoomControl: true,
disableDoubleClickZoom: false,
zoomControlOptions: {
position: google.maps.ControlPosition.RIGHT_BOTTOM,
style: google.maps.ZoomControlStyle.SMALL
}
};
map_gm_76121 = new google.maps.Map(document.getElementById('gm_76121'), myOptions);
markers_gm_76121.push(new myMarker_gm_76121(0, 20.44291, -97.3195, 'Fortunato Vargas Riaño', 'Rodolfo Curti 122-b entre las calles Severo Polo y Riva Palacio', null, null));
for (var i = 0; i< markers_gm_76121.length;i++){
markers_gm_76121[i].Instanciate();
}
}
function myMarker_gm_76121(id, lat, lng, title, description, linkAddress, linkTarget) {
this.id = id;
this.lat = lat;
this.lng = lng;
this.description = description;
this.title = title;
if (linkAddress){
this.link = new Link_gm_76121(linkAddress, linkTarget);
}
this.marker = null;
this.GetInfoWindowHTML = function() {
var result = '
';
result += '' + this.title + ' |
';
if (this.description != '')
result += '' + this.description + ' |
';
if (this.link != null)
result += '' + this.link.address + ' |
';
result += '
';
return result;
};
this.Instanciate = function() {
var position = new google.maps.LatLng(lat, lng);
var options = {
clickable: true,
draggable: false,
position: position,
map: map_gm_76121
};
this.marker = new google.maps.Marker(options);
this.marker.customId = this.id;
google.maps.event.addListener(this.marker, 'click', marker_click_gm_76121);
};
}
function Link_gm_76121(address, target) {
this.address = address;
this.target = target;
}
function marker_click_gm_76121(e) {
showInfoWindow_gm_76121(this);
}
function findMarker_gm_76121(id) {
var result = null;
for (var i = 0; i < markers_gm_76121.length; i++) {
if (markers_gm_76121[i].id == id) {
result = markers_gm_76121[i];
break;
}
}
return result;
}
function showInfoWindow_gm_76121(e) {
var marker = findMarker_gm_76121(e.customId);
var infoWindow = new google.maps.InfoWindow({
content: marker.GetInfoWindowHTML()
});
infoWindow.markerId = marker.id;
google.maps.event.addListener(infoWindow, 'closeclick', infowindow_closeclick_gm_76121);
closeAllInfoWindows_gm_76121();
infoWindow.open(map_gm_76121, marker.marker);
openedInfoWindows_gm_76121.push(infoWindow);
}
function infowindow_closeclick_gm_76121(e) {
closeAllInfoWindows_gm_76121();
}
function closeAllInfoWindows_gm_76121() {
var infoWindow = openedInfoWindows_gm_76121.pop();
while (infoWindow != null) {
infoWindow.close();
infoWindow = openedInfoWindows_gm_76121.pop();
}
}