Well, that was easy. Map markers have labels. Will probably change marker style.

This commit is contained in:
Nick Foster 2013-07-22 21:19:40 -07:00
parent 2869446a9a
commit 8d3b4d4da1

View File

@ -27,6 +27,8 @@ def html_template(my_position, json_file):
</style> </style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
</script> </script>
<script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.9/src/markerwithlabel.js">
</script>
<script type="text/javascript"> <script type="text/javascript">
var map; var map;
var markers = []; var markers = [];
@ -92,13 +94,12 @@ def html_template(my_position, json_file):
map: map, map: map,
position: airplanes[airplane].center, position: airplanes[airplane].center,
icon: plane_icon, icon: plane_icon,
//label content meaningless unless you use the MarkerWithLabel class from the Maps Utility Library
labelContent: identstr, labelContent: identstr,
labelAnchor: new google.maps.Point(64, 0), labelAnchor: new google.maps.Point(64, 0),
labelClass: "labels", labelClass: "labels",
labelStyle: {opacity: 0.75} labelStyle: {opacity: 0.75}
}; };
planeMarker = new google.maps.Marker(planeOptions); planeMarker = new MarkerWithLabel(planeOptions);
planes.push(planeMarker); planes.push(planeMarker);
}; };
}; };