コード例 #1
0
ファイル: GoogleMapJS.cs プロジェクト: Shine6Z/GenXSource
        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);
        }
コード例 #2
0
ファイル: GoogleMapJS.cs プロジェクト: Shine6Z/GenXSource
        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);
        }
コード例 #3
0
ファイル: Map.cs プロジェクト: Shine6Z/GenXSource
 public void DeleteShape(MapShapes shape)
 {
     mapShapeList.Remove(shape);
     mapServiceJS.MapDeleteShape(shape, this);
 }
コード例 #4
0
ファイル: Map.cs プロジェクト: Shine6Z/GenXSource
 public void AddShape(MapShapes shape)
 {
     mapShapeList.Add(shape);
     mapServiceJS.MapAddShape(shape, this);
 }
コード例 #5
0
ファイル: GoogleMapJS.cs プロジェクト: Shine6Z/GenXSource
 public void MapDeleteShape(MapShapes shape, Map mapJsObj)
 {
     HtmlPage.Window.Eval(mapJsObj.Id + ".removeOverlay(" + shape.Id + ");");
 }
コード例 #6
0
ファイル: GoogleMapJS.cs プロジェクト: Shine6Z/GenXSource
 public void MapAddShape(MapShapes shape, Map mapJsObj)
 {
     HtmlPage.Window.Eval(mapJsObj.Id + ".addOverlay(" + shape.Id + ");");
 }
コード例 #7
0
ファイル: GoogleMapJS.cs プロジェクト: Shine6Z/GenXSource
 public void ShapeDispose(MapShapes shape)
 {
     HtmlPage.Window.Eval(shape.Id + " = null;");
 }
コード例 #8
0
ファイル: GoogleMapJS.cs プロジェクト: Shine6Z/GenXSource
 public void ShapeMarkerSetPoint(MapShapes shape, LatLng point)
 {
     HtmlPage.Window.Eval(shape.Id + ".setLatLng(new GLatLng(" + point.ToString() + "));");
 }