Map.ElementLayer.Children.Add(imgSample, -118, 32)
<UserControl x:Class="Crime_Map_Test.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400"> <Grid x:Name="LayoutRoot" Background="White"> <esri:Map x:Name="MyMap"> <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer"/> <esri:ElementLayer> <esri:ElementLayer.Children> </esri:ElementLayer.Children> </esri:ElementLayer> </esri:Map> </Grid> </UserControl>
Imports ESRI.ArcGIS.Client.ElementLayer Imports System.Windows.UIElement Partial Public Class MainPage Inherits UserControl Public Sub New() InitializeComponent() End Sub End Class
<esri:ElementLayer ID="elementLayer" />
Imports ESRI.ArcGIS.Client Imports ESRI.ArcGIS.Client.Geometry Partial Public Class MainPage Inherits UserControl Public Sub New() InitializeComponent() Dim layer As ElementLayer = MyMap.Layers("elementLayer") ' TODO: Set coordinates Dim envelope = New Envelope(0, 0, 0, 0) Dim rectangle = New Rectangle rectangle.Width = 3 rectangle.Height = 3 rectangle.Fill = New SolidColorBrush(Colors.Red) ElementLayer.SetEnvelope(rectangle, envelope) layer.Children.Add(rectangle) Dim textBlock = New TextBlock() textBlock.Text = "Hello world" ElementLayer.SetEnvelope(textBlock, envelope) layer.Children.Add(textBlock) End Sub End Class
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.