<!DOCTYPE html>
<html>
<head>
<!-- This stylesheet contains specific styles for displaying
the map on this page. Replace it with your own styles as
described in the documentation:
https://developers.google.com/maps/documentation/javascript/tutorial
-->
<link rel="stylesheet" href="/maps/documentation/javascript/cgc/demos.css">
</head>
<body>
<div id="map"></div>
<script>
function initMap() {
var myLatLng = {lat: -25.363, lng: 131.044};
// Create a map object and specify the DOM element
// for display.
var map = new google.maps.Map(document.getElementById('map'), {
center: myLatLng,
zoom: 4
});
// Create a marker and set its position.
var marker = new google.maps.Marker({
map: map,
position: myLatLng,
title: 'Hello World!'
});
}
</script>
<script defer="defer" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAGTNGHfKf2q2zX1cNVDualTTn7u2Gdqc8&callback=initMap"></script>
</body>
</html>
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.
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!
Console
Debug your Fiddle with a minimal built-in JavaScript console.