Custom markers

by Chris Hughes

HTML

<title>Current Conditions</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

<body onload="initialize()">
  <div id="map" style="width: 530px; height:600px"></div>
  <div id="legend">
    <h4 id='legend_title' name='legend_title'></h4></div>

CSS

#legend {
   font-family: Arial, sans-serif;
   background: #fff;
   padding: 10px;
   margin: 10px;
   border: 3px solid #000;
 }

JavaScript

function initialize() {

  mapStyle = [{
    "elementType": "labels",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "administrative.neighborhood",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "poi",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "poi.business",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "poi.park",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "road",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "road",
    "elementType": "labels.icon",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "transit",
    "stylers": [{
      "visibility": "off"
    }]
  }];

  var map = new google.maps.Map(document.getElementById("map"), {
    zoom: 8,
    styles: mapStyle,
    center: new google.maps.LatLng(39.2, -75.6),
    mapTypeId: google.maps.MapTypeId.ROADMAP
  });

  var stations = [
    ["	Kitts Hummock, DE-NERR	", 39.0882, -75.4373, 50],
    ["	West Grove, PA-SECCRA	", 39.865556, -75.846389, 23],
    ["	Kennett Square, PA-Longwood	", 39.871667, -75.6825, 25],
    ["	Blackbird, DE-NERR	", 39.390833, -75.627778, 41],
    ["	Bethany Beach, DE-Boardwalk	", 38.538889, -75.054167, 80],
    ["	Bethany Beach, DE-NGTS	", 38.5464, -75.0627, 78],
    ["	Wilmington, DE-NSWMC	", 39.732778, -75.518333, 41],
    ["	Fair Hill, MD-NRMA	", 39.7099, -75.8386, 15],
    ["	Sandtown,DE-CSWMC	", 39.037778, -75.729722, 55],
    ["	Jones Crossroads, DE-SSWMC	", 38.594722, -75.436667, 55],
    ["	Newark, DE-Ag Farm	", 39.6695, -75.7503, 42],
    ["	Georgetown, DE-REC	", 38.6361, -75.455, 66],
    ["	Harbeson, DE-REC	", 38.678611, -75.246389, 59],
    ["	Laurel, DE-Airport	", 38.5415, -75.5927, 60],
    ["	Townsend, DE-REC	", 39.3911, -75.7482, 60],
    ["	Harrington, DE-Raceway	", 38.9113, -75.5767, 60],
    ["	Dover, DE-DSFS	", 39.1697, -75.593, 51],
    ["	Bridgeville,...