Necesito crear un link dentro de la ventana de informacion y que al hacer click, para que esta me redirija a una ventana (div) que se desplegaria a la derecha, como puedo hacerlo?
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: new google.maps.LatLng(-25.415896, -54.616280),
zoom: 12
});
var infoWindow = new google.maps.InfoWindow;
downloadUrl('resultado_gm.php', function(data) {
var xml = data.responseXML;
var markers = xml.documentElement.getElementsByTagName('marker');
Array.prototype.forEach.call(markers, function(markerElem) {
var name = markerElem.getAttribute('name');
var address = markerElem.getAttribute('address');
var id = markerElem.getAttribute('id');
var type = markerElem.getAttribute('type');
var point = new google.maps.LatLng(
parseFloat(markerElem.getAttribute('lat')),
parseFloat(markerElem.getAttribute('lng')));
var infowincontent = document.createElement('div');
var strong = document.createElement('strong');
strong.textContent = name
infowincontent.appendChild(strong);
infowincontent.appendChild(document.createElement('br'));
var text = document.createElement('text');
text.textContent = address
infowincontent.appendChild(text);
infowincontent.appendChild(document.createElement('br'));
var text2 = document.createElement('text2');
text2.textContent = id
infowincontent.appendChild(text2);
var icon = customLabel[type] || {};
var marker = new google.maps.Marker({
map: map,
position: point,
icon: icon.icon,
draggable: true,
animation: google.maps.Animation.DROP
});
marker.setAnimation(google.maps.Animation.BOUNCE);
marker.addListener('click', function() {
infoWindow.setContent(infowincontent);
infoWindow.open(map, marker);
});
});
});
}
function downloadUrl(url, callback) {
var request = window.ActiveXObject ?
new ActiveXObject('Microsoft.XMLHTTP') :
new XMLHttpRequest;
request.onreadystatechange = function() {
if (request.readyState == 4) {
request.onreadystatechange = doNothing;
callback(request, request.status);
}
};
request.open('GET', url, true);
request.send(null);
}
function doNothing() {}
/////era para regargar los marcadores pero aun no funciona
google.maps.event.trigger(map, 'resize');
////////