Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

A simple google map api example.

View google_map.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
<!doctype html>
<html lang='zh'>
<head>
<meta charset="UTF-8">
<!-- For mobile devices. -->
<title>Google map</title>
<style type="text/css">
#map_canvas { width:299px;height:234px; }
</style>
<script type="text/javascript" src="http://ditu.google.cn/maps/api/js?sensor=false"></script>
</head>
<body>
<div id="map_canvas"></div>
<script type="text/javascript">
(function() {
var latlng = new google.maps.LatLng(31.119492, 121.369738),
map = new google.maps.Map(document.getElementById("map_canvas"), {
zoom: 15,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false
});
new google.maps.Marker({
map: map,
position: latlng,
title: '上海海尔莘庄旗舰店'
});
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.