﻿
var map;
var cgm;

$(document).ready(function() {
	mapInit();
});

function mapInit() {
	map = new GMap2($("#profile_map").get(0));
	map.setCenter(new GLatLng(33.823215, -116.512114), 11);
	map.disableDragging();
	//map.enableContinuousZoom();
	//map.enableScrollWheelZoom();

	cgm = new CRGGoogleMap(map, { maxInitZoom: 15, minClusterSize: 0 });
	//cgm.onLayersLoadStart = function() { $("#loading").show(); };
	//cgm.onLayersLoadComplete = function() { $("#loading").hide(); };
	//cgm.onZoomEnd = function(o, n) { setupLayers(); };
	cgm.initialize();

	ml = new MapLayer("Entry", "/WebServices/MapService.svc/GetOverlayByEntryId", { 'entryIds': ProfileEntry }, { visible: true, center: true, filterMb: false, cluster: false });
	ml.MarkerOptions = { icon: createicon('/images/map/marker_yellowstar.png') };
	ml.onClick = markerClick;
	cgm.addLayer(ml);

	//setupLayers();
}
