Exemple #1
0
        public void ShapeMarker(MapShapes shape, LatLng point, String title, String iconSource)
        {
            String icon = "G_DEFAULT_ICON";

            if (iconSource != null)
            {
                icon = "new GIcon(G_DEFAULT_ICON,'" + iconSource + "')";
            }
            String evalString = shape.Id + " = new GMarker(new GLatLng(" + point.ToString() + "),{title: '" + title + "',icon:" + icon + "});";

            HtmlPage.Window.Eval(evalString);
            ShapeInitClickHandler(shape.Id);
        }
Exemple #2
0
        public void ShapePolyLine(MapShapes shape, LatLng[] points, System.Windows.Media.Color color, Int32 weight, Double opacity)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("var " + shape.Id + " = new GPolyline([");
            for (int i = 0; i < points.Length - 1; i++)
            {
                sb.Append("new GLatLng(" + points[i].ToString() + ")");
                sb.Append(",");
            }
            sb.Append("new GLatLng(" + points[points.Length - 1].ToString() + ")],");
            sb.Append("'" + Utility.ColorToRGB(color) + "'," + weight + "," + opacity + ");");
            HtmlPage.Window.Eval(sb.ToString());
            ShapeInitClickHandler(shape.Id);
        }
Exemple #3
0
 public void DeleteShape(MapShapes shape)
 {
     mapShapeList.Remove(shape);
     mapServiceJS.MapDeleteShape(shape, this);
 }
Exemple #4
0
 public void AddShape(MapShapes shape)
 {
     mapShapeList.Add(shape);
     mapServiceJS.MapAddShape(shape, this);
 }
Exemple #5
0
 public void MapDeleteShape(MapShapes shape, Map mapJsObj)
 {
     HtmlPage.Window.Eval(mapJsObj.Id + ".removeOverlay(" + shape.Id + ");");
 }
Exemple #6
0
 public void MapAddShape(MapShapes shape, Map mapJsObj)
 {
     HtmlPage.Window.Eval(mapJsObj.Id + ".addOverlay(" + shape.Id + ");");
 }
Exemple #7
0
 public void ShapeDispose(MapShapes shape)
 {
     HtmlPage.Window.Eval(shape.Id + " = null;");
 }
Exemple #8
0
 public void ShapeMarkerSetPoint(MapShapes shape, LatLng point)
 {
     HtmlPage.Window.Eval(shape.Id + ".setLatLng(new GLatLng(" + point.ToString() + "));");
 }