Пример #1
0
 public Map(PointU16 mapSize, Orientation orientation, PointD cellSize, PointD origin, MapShapes mapShape = MapShapes.Rectangle)
 {
     _mapSize = mapSize;
     _shape = mapShape;
     mapLayout = new Layout(orientation, cellSize, origin);
     hexes = new List<Hex>();
 }
Пример #2
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);
 }
Пример #3
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);
 }
Пример #4
0
 public void ShapeMarkerSetPoint(MapShapes shape, LatLng point)
 {
     HtmlPage.Window.Eval(shape.Id + ".setLatLng(new GLatLng(" + point.ToString() + "));");
 }
Пример #5
0
 public void MapDeleteShape(MapShapes shape, Map mapJsObj)
 {
     HtmlPage.Window.Eval(mapJsObj.Id + ".removeOverlay(" + shape.Id + ");");
 }
Пример #6
0
 public void MapAddShape(MapShapes shape, Map mapJsObj)
 {
     HtmlPage.Window.Eval(mapJsObj.Id + ".addOverlay(" + shape.Id + ");");
 }
Пример #7
0
 public void ShapeDispose(MapShapes shape)
 {
     HtmlPage.Window.Eval(shape.Id + " = null;");
 }
Пример #8
0
 public void DeleteShape(MapShapes shape)
 {
     mapShapeList.Remove(shape);
     mapServiceJS.MapDeleteShape(shape,this);
 }
Пример #9
0
 public void AddShape(MapShapes shape)
 {
     mapShapeList.Add(shape);
     mapServiceJS.MapAddShape(shape, this);
 }