﻿//<![CDATA[

var map;

var datapoints = [];


function loadgmap() {      
    if (GBrowserIsCompatible()) {        
        map = new GMap2(document.getElementById("usermap"));    
        map.setCenter(new GLatLng(38, -94), 2);
        map.setMapType(G_HYBRID_MAP);
        map.addControl(new GSmallMapControl());
        var arrow = new GIcon(G_DEFAULT_ICON);
        arrow.image = "images/person.png";
        arrow.iconSize = new GSize(14,41);
   
        mgr = new GMarkerManager(map);
        
        var markers = [];
        
        for (var j in states) {      
            var place = states[j];  
            
            var posn = new GLatLng(place["posn"][0], place["posn"][1]);
            m = new GMarker(posn, { title: place["name"], icon: arrow });
            markers.push(m);
            
           }
        mgr.addMarkers(markers,0); 
        mgr.refresh();

      }
}

$(function() { loadgmap(); });

//]]>   
