Ejemplo n.º 1
0
        /// <summary>
        /// Arrange item in canvas.
        /// </summary>
        /// <param name="item">Item to arrange.</param>
        internal void ArrangeItem(UIElement element)
        {
            MapCanvasItem item = null;

            this.internalItems.TryGetValue(element.GetHashCode(), out item);

            if (item != null)
            {
                Location location = MapLayer.GetLocation(element);
                if (location.IsEmpty)
                {
                    return;
                }

                ICoordinateService coordinateService = CoordinateServiceProvider.GetService(this.Map);
                Point pixel = coordinateService.GeographicToPixel(location);
                this.SetItemPosition(item, pixel);
            }
        }