Skip to content

Instantly share code, notes, and snippets.

@sakozz
Created February 12, 2015 19:03
Show Gist options
  • Save sakozz/6957b1508f3ac5ae157e to your computer and use it in GitHub Desktop.
Save sakozz/6957b1508f3ac5ae157e to your computer and use it in GitHub Desktop.
Predefined Marker Symbols // source http://jsbin.com/raxedogeku
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Predefined Marker Symbols</title>
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
<script>
</script>
</head>
<body>
<div id="map-canvas"></div>
<script id="jsbin-javascript">
function initialize() {
var mapOptions = {
zoom: 18,
center: new google.maps.LatLng(60.1710558, 24.94268409999995)
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var goldStar = {
path:'M 0, 0 m -10, 0 a 10,10 0 1,0 20,0 a 10, 10 0 1,0 -20,0',
fillColor: 'red',
fillOpacity: 0.8,
scale: 1,
strokeColor: 'gold',
strokeWeight: 5
};
var marker = new google.maps.Marker({
position: map.getCenter(),
icon: goldStar,
map: map
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
<script id="jsbin-source-javascript" type="text/javascript">function initialize() {
var mapOptions = {
zoom: 18,
center: new google.maps.LatLng(60.1710558, 24.94268409999995)
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var goldStar = {
path:'M 0, 0 m -10, 0 a 10,10 0 1,0 20,0 a 10, 10 0 1,0 -20,0',
fillColor: 'red',
fillOpacity: 0.8,
scale: 1,
strokeColor: 'gold',
strokeWeight: 5
};
var marker = new google.maps.Marker({
position: map.getCenter(),
icon: goldStar,
map: map
});
}
google.maps.event.addDomListener(window, 'load', initialize);</script></body>
</html>
function initialize() {
var mapOptions = {
zoom: 18,
center: new google.maps.LatLng(60.1710558, 24.94268409999995)
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var goldStar = {
path:'M 0, 0 m -10, 0 a 10,10 0 1,0 20,0 a 10, 10 0 1,0 -20,0',
fillColor: 'red',
fillOpacity: 0.8,
scale: 1,
strokeColor: 'gold',
strokeWeight: 5
};
var marker = new google.maps.Marker({
position: map.getCenter(),
icon: goldStar,
map: map
});
}
google.maps.event.addDomListener(window, 'load', initialize);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment