Created
May 1, 2015 15:10
-
-
Save sshkarupa/7f0fa693694c5afa35f0 to your computer and use it in GitHub Desktop.
Карта google.map через api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body onload="initialize()"> | |
<!-- | |
HTML-code | |
--> | |
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDUkdtaBd_1FBRCG5BMOdHILr-paQ7aTUQ&sensor=false"> // | |
</script> | |
<script type="text/javascript"> | |
function initialize() { | |
var LatLng = new google.maps.LatLng(50.056900, 14.281737); // координаты на карте | |
var mapOptions = { | |
center: LatLng, | |
zoom: 13, | |
streetViewControl: false, | |
zoomControl: true, | |
zoomControlOptions: { | |
position: google.maps.ControlPosition.LEFT_CENTER | |
}, | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}; | |
var map = new google.maps.Map(document.getElementById("map_canvas"), | |
mapOptions); | |
var image = 'img/map_marker.png' // маркер | |
var marker = new google.maps.Marker({ | |
position: LatLng, | |
map: map, | |
icon: image, | |
title: '3-х комнатная квартира в Зличине' // всплывающая подсказка | |
}); | |
} | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment