Exemplo n.º 1
0
        internal AreaHandle(CoordinatesHandle topLeft, CoordinatesHandle bottomRight) : this(IntPtr.Zero, true)
        {
            IntPtr _topLeft     = (topLeft != null ? topLeft : IntPtr.Zero);
            IntPtr _bottomRight = (bottomRight != null ? bottomRight : IntPtr.Zero);

            CreateRectangle(_topLeft, _bottomRight, out handle).ThrowIfFailed("Failed to create native handle");
        }
Exemplo n.º 2
0
        internal MarkerHandle(CoordinatesHandle coordinates, string imagePath, ViewMarkerType type) : base(IntPtr.Zero, true)
        {
            var clonedCoordinatesHandle = CoordinatesHandle.CloneFrom(coordinates);

            CreateMarker(clonedCoordinatesHandle, imagePath, type, out handle).ThrowIfFailed("Failed to create native handle for marker");
            clonedCoordinatesHandle.HasOwnership = false;
        }
Exemplo n.º 3
0
        internal CoordinatesHandle ScreenToGeolocation(Point position)
        {
            IntPtr coordinates;

            this.ScreenToGeolocation(position.X, position.Y, out coordinates).WarnIfFailed("Failed to convert screen position to geocoordinates");
            return(CoordinatesHandle.Create(coordinates));
        }
Exemplo n.º 4
0
        internal OverlayHandle(CoordinatesHandle coordinates, EvasObject viewObject, ViewOverlayType type) : base(IntPtr.Zero, true)
        {
            var clonedCoordinatesHandle = CoordinatesHandle.CloneFrom(coordinates);

            CreateOverlay(clonedCoordinatesHandle, viewObject, type, out handle).ThrowIfFailed("Failed to create native overlay handle");
            clonedCoordinatesHandle.HasOwnership = false;
        }
Exemplo n.º 5
0
        internal void ForEach(Action <CoordinatesHandle> action)
        {
            CoordinatesCallback callback = (index, handle, userData) =>
            {
                action(CoordinatesHandle.CloneFrom(handle));
                return(true);
            };

            Foreach(handle, callback, IntPtr.Zero).WarnIfFailed("Failed to get coordinates list from native handle");
        }
Exemplo n.º 6
0
        internal Point GeolocationToScreen(CoordinatesHandle coordinates)
        {
            int x, y;

            this.GeolocationToScreen(coordinates, out x, out y).WarnIfFailed("Failed to convert geocoordinates to screen position");
            return(new Point()
            {
                X = x, Y = y
            });
        }
Exemplo n.º 7
0
 internal void Add(CoordinatesHandle handleToAdd)
 {
     using (var clonedHandle = CoordinatesHandle.CloneFrom(handleToAdd))
     {
         if (this.Append(clonedHandle).WarnIfFailed("Failed to add coordinates to the list"))
         {
             clonedHandle.HasOwnership = false;
         }
     }
 }
Exemplo n.º 8
0
        internal void ForeachPath(Action <CoordinatesHandle> action)
        {
            PathCallback callback = (index, total, nativeHandle, userData) =>
            {
                if (handle != IntPtr.Zero)
                {
                    action(CoordinatesHandle.CloneFrom(nativeHandle));
                    //Destroy(nativeHandle);
                }
                return(true);
            };

            ForeachPath(handle, callback, IntPtr.Zero).WarnIfFailed("Failed to get path coordinates list from native handle");
        }
Exemplo n.º 9
0
 internal static extern ErrorCode CreateOverlay(CoordinatesHandle /* maps_coordinates_h */ coordinates, IntPtr viewObject, ViewOverlayType /* maps_view_overlay_type_e */ type, out IntPtr /* maps_view_object_h */ overlay);
Exemplo n.º 10
0
 internal static extern ErrorCode SetCoordinates(this OverlayHandle /* maps_view_object_h */ overlay, CoordinatesHandle /* maps_coordinates_h */ coordinates);
Exemplo n.º 11
0
        internal AreaHandle(CoordinatesHandle center, double radius) : this(IntPtr.Zero, true)
        {
            IntPtr _center = (center != null ? center : IntPtr.Zero);

            CreateCircle(_center, radius, out handle).ThrowIfFailed("Failed to create native handle");
        }
Exemplo n.º 12
0
 internal static extern ErrorCode GeolocationToScreen(this ViewHandle /* maps_view_h */ view, CoordinatesHandle /* maps_coordinates_h */ coordinates, out int x, out int y);
Exemplo n.º 13
0
 internal static extern ErrorCode SearchRoute(this ServiceHandle /* maps_service_h */ maps, CoordinatesHandle /* maps_coordinates_h */ origin, CoordinatesHandle /* maps_coordinates_h */ destination, PreferenceHandle /* maps_preference_h */ preference, SearchRouteCallback callback, IntPtr /* void */ userData, out int requestId);
Exemplo n.º 14
0
 internal static extern ErrorCode CreateMarker(CoordinatesHandle /* maps_coordinates_h */ coordinates, string imageFilePath, ViewMarkerType /* maps_view_marker_type_e */ type, out IntPtr /* maps_view_object_h */ marker);
Exemplo n.º 15
0
 internal static extern ErrorCode SetCoordinates(this MarkerHandle /* maps_view_object_h */ marker, CoordinatesHandle /* maps_coordinates_h */ coordinates);
Exemplo n.º 16
0
 internal static extern ErrorCode SearchPlace(this ServiceHandle /* maps_service_h */ maps, CoordinatesHandle /* maps_coordinates_h */ position, int distance, PlaceFilterHandle /* maps_place_filter_h */ filter, PreferenceHandle /* maps_preference_h */ preference, SearchPlaceCallback callback, IntPtr /* void */ userData, out int requestId);
Exemplo n.º 17
0
 internal static extern ErrorCode Remove(this CoordinatesListHandle /* maps_coordinates_list_h */ coordinatesList, CoordinatesHandle /* maps_coordinates_h */ coordinates);
Exemplo n.º 18
0
 internal static extern ErrorCode GetLongitude(this CoordinatesHandle /* maps_coordinates_h */ coordinates, out double longitude);
Exemplo n.º 19
0
 internal static extern ErrorCode SetCenter(this ViewHandle /* maps_view_h */ view, CoordinatesHandle /* maps_coordinates_h */ coordinates);