$(document).ready(initializeMap_gm_62193);
var map_gm_62193;
var markers_gm_62193 = [];
var openedInfoWindows_gm_62193 = [];
function initializeMap_gm_62193(){
var latlng = new google.maps.LatLng(19.06102, -98.2252);
var myOptions = {
zoom: 15,
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_62193 = new google.maps.Map(document.getElementById('gm_62193'), myOptions);
markers_gm_62193.push(new myMarker_gm_62193(0, 19.06126, -98.2254, 'FU.MA.SA', '2 Poniente #3906 Col. Amor Puebla, Pue. México. C.P. 72140', null, null));
for (var i = 0; i< markers_gm_62193.length;i++){
markers_gm_62193[i].Instanciate();
}
}
function myMarker_gm_62193(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_62193(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_62193
};
this.marker = new google.maps.Marker(options);
this.marker.customId = this.id;
google.maps.event.addListener(this.marker, 'click', marker_click_gm_62193);
};
}
function Link_gm_62193(address, target) {
this.address = address;
this.target = target;
}
function marker_click_gm_62193(e) {
showInfoWindow_gm_62193(this);
}
function findMarker_gm_62193(id) {
var result = null;
for (var i = 0; i < markers_gm_62193.length; i++) {
if (markers_gm_62193[i].id == id) {
result = markers_gm_62193[i];
break;
}
}
return result;
}
function showInfoWindow_gm_62193(e) {
var marker = findMarker_gm_62193(e.customId);
var infoWindow = new google.maps.InfoWindow({
content: marker.GetInfoWindowHTML()
});
infoWindow.markerId = marker.id;
google.maps.event.addListener(infoWindow, 'closeclick', infowindow_closeclick_gm_62193);
closeAllInfoWindows_gm_62193();
infoWindow.open(map_gm_62193, marker.marker);
openedInfoWindows_gm_62193.push(infoWindow);
}
function infowindow_closeclick_gm_62193(e) {
closeAllInfoWindows_gm_62193();
}
function closeAllInfoWindows_gm_62193() {
var infoWindow = openedInfoWindows_gm_62193.pop();
while (infoWindow != null) {
infoWindow.close();
infoWindow = openedInfoWindows_gm_62193.pop();
}
}