// Este ejemplo muestra un marcador centrado en el Congreso de los Diputados
// Cuando hacemos clic sobre el marcador, se abre una ventana popup
function initMap() {
var congreso = {lat: 40.4164176, lng: -3.696561};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 16,
center: congreso
});
var contentString = '<div id="content">'+
'<div id="siteNotice">'+
'</div>'+
'<h1 id="firstHeading" class="firstHeading">Congreso de los Diputados</h1>'+
'<div id="bodyContent">'+
'<p>La <strong>Constitución española</strong> establece en el artículo 68.1 que el Congreso de los Diputados debe estar' +
'compuesto por un mínimo de 300 y un máximo de 400 diputados. '+
'compuesto por un mínimo de 300 y un máximo de 400 diputados. '+
'Orgánica de Régimen Electoral General, aprobada en 1985 '+
'<p>Attribution: Wikipedia, <a href="https://es.wikipedia.org/wiki/Congreso_de_los_Diputados</a> '+
'(Última visita Febrero 2017).</p>'+
'</div>'+
'</div>';
var infowindow = new google.maps.InfoWindow({
content: contentString
});
var marker = new google.maps.Marker({
position: congreso,
map: map,
title: 'Congreso de los Diputados',
type: 'info'
});
marker.addListener('click', function() {
infowindow.open(map, marker);
});
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Fiddle Pages
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Get Fiddle Pages with PRO
Your fiddles accessible under a custom domain and a vanity path - the simplest hosting for your personal project.