function createMarker(point, html, StartEnd) { var markerImage var markerIcon = new GIcon(G_DEFAULT_ICON); markerIcon.image = markerImage; markerIcon.iconSize = new GSize(50, 50); markerIcon.iconAnchor = new GPoint(25, 25); var marker; if (StartEnd == "true") { marker = new GMarker(point, { icon: markerIcon }); } else { marker = new GMarker(point); } GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }
StringBuilder sbx = new StringBuilder(); sbx.Append("<script language=javascript> createMarker() { var markerIcon = []; "); sbx.Append("Image markerImage = new Image()"); //markerIcon. sbx.Append("ImageUrl = ~/Images/AirplaneIcon.gif"); sbx.Append("}</script>"); Page.RegisterStartupScript("createMarker", sbx.ToString());
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)