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); }
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); }
public void DeleteShape(MapShapes shape) { mapShapeList.Remove(shape); mapServiceJS.MapDeleteShape(shape, this); }
public void AddShape(MapShapes shape) { mapShapeList.Add(shape); mapServiceJS.MapAddShape(shape, this); }
public void MapDeleteShape(MapShapes shape, Map mapJsObj) { HtmlPage.Window.Eval(mapJsObj.Id + ".removeOverlay(" + shape.Id + ");"); }
public void MapAddShape(MapShapes shape, Map mapJsObj) { HtmlPage.Window.Eval(mapJsObj.Id + ".addOverlay(" + shape.Id + ");"); }
public void ShapeDispose(MapShapes shape) { HtmlPage.Window.Eval(shape.Id + " = null;"); }
public void ShapeMarkerSetPoint(MapShapes shape, LatLng point) { HtmlPage.Window.Eval(shape.Id + ".setLatLng(new GLatLng(" + point.ToString() + "));"); }