Initializing...
Liveweave
expand_more
home
Home
data_object
CSS Explorer
arrow_outward
Palette
Color Explorer
arrow_outward
Polyline
Graphics Editor
arrow_outward
outbox_alt
Generative AI
arrow_outward
build
Tools
expand_more
restart_alt
Load base template
post_add
Generate Lorem ipsum...
code
Format HTML
code_blocks
Format CSS
data_object
Format JavaScript
library_add
Library
expand_more
A
Algolia JS
Animate CSS
Apex Charts JS
B
Bulma CSS
Bootstrap
C
Chart JS
Chartist
Create JS
D
D3
Dojo
F
Foundation
Fullpage JS
G
Granim JS
Google Charts
H
Halfmoon
J
jQuery
M
Materialize
Moment JS
Masonry JS
Milligram CSS
P
Pure CSS
Primer CSS
Popper JS
Pattern CSS
Picnic CSS
R
React JS
Raphael JS
Raisin CSS
S
Semantic UI
Skeleton CSS
Spectre CSS
Tachyons CSS
T
Tailwind
Three JS
U
UI Kit
Vis JS
W
Water CSS
download
Download
expand_more
developer_mode
Download as HTML
folder_zip
Download as .ZIP
cloud_upload
Save
account_circle
Login
settings
Settings
expand_more
14
px
Live mode
Night mode
Line number
Mini map
Word wrap
sync_alt
Reset Settings
smart_display
Run
<!DOCTYPE html> <html> <head> <!-- Se carga la API--> <script src="http://maps.googleapis.com/maps/api/js"> </script> </head> <body> <!-- Se crea el contenedor del mapa y se le asigna un estilo en css--> <div id="googleMap"></div> </body> </html>
#googleMap {width:100%; height:480px}
// Se crea una función para iniciar el mapa function initialize() { // A través de una variable se crea un obketo para definir las propiedades del mapa, incluyendo el nivel de zoom y el tipo de mapa var mapProp = { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, mapTypeId:google.maps.MapTypeId.ROADMAP }; // Se crea el objeto mapa, y se pasa como parámetro las propiedades definidas en la variable anterior mapProp var map=new google.maps.Map(document.getElementById("googleMap"), mapProp); } // Por último, se coloca un evento Listener para cargar el mapa cuando esté la página cargada google.maps.event.addDomListener(window, 'load', initialize);