Interface MapProvider

  • All Known Implementing Classes:
    GoogleMapsMapProvider

    public interface MapProvider
    Operations to implement a map in the Outside Plant module.
    Author:
    Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
    • Method Detail

      • getComponent

        com.vaadin.flow.component.Component getComponent()
        Gets a component that represents a map.
        Returns:
        The map provider component.
      • getCenter

        GeoCoordinate getCenter()
        Gets the map center
        Returns:
        map center
      • setCenter

        void setCenter​(GeoCoordinate center)
        Set map center
        Parameters:
        center - map center
      • getZoom

        double getZoom()
        Gets the map zoom
        Returns:
        map zoom
      • setZoom

        void setZoom​(double zoom)
        Set the map zoom
        Parameters:
        zoom - map zoom
      • getMinZoomForLabels

        double getMinZoomForLabels()
        Gets the minimum zoom level for the map when displaying labels.
        Returns:
        The minimum zoom level for the map when displaying labels.
      • setMinZoomForLabels

        void setMinZoomForLabels​(double minZoomForLabels)
        Sets the minimum zoom level for the map when displaying labels.
        Parameters:
        minZoomForLabels - The minimum zoom level for the map when displaying labels.
      • getMapTypeId

        String getMapTypeId()
        Gets the map type id.
        Returns:
        The map type id.
      • setMapTypeId

        void setMapTypeId​(String mapTypeId)
        Sets the map type id.
        Parameters:
        mapTypeId - The map type id.
      • getMapTypeIds

        List<String> getMapTypeIds()
        Gets the map type ids.
        Returns:
        The map type ids.
      • setHandMode

        void setHandMode()
        Set the map hand mode.
      • setDrawingMarkerMode

        void setDrawingMarkerMode​(Consumer<GeoCoordinate> drawingMarkerComplete)
        Sets the drawing mode to marker.
        Parameters:
        drawingMarkerComplete - Operation that accepts a coordinate
      • setDrawingEdgeMode

        void setDrawingEdgeMode​(BiConsumer<HashMap<String,​Object>,​Runnable> callbackEdgeComplete)
        Sets the drawing mode to edge.
        Parameters:
        callbackEdgeComplete - Callback to execute when drawing edge complete.
      • setPathSelectionMode

        void setPathSelectionMode​(BiConsumer<List<BusinessObjectViewEdge>,​Runnable> callbackPathSelectionComplete)
        Sets the path selection mode.
        Parameters:
        callbackPathSelectionComplete - Callback to execute when path selection complete.
      • getComputeEdgesLength

        boolean getComputeEdgesLength()
        Gets if compute edges length.
        Returns:
        If compute edges length.
      • setComputeEdgesLength

        void setComputeEdgesLength​(boolean computeEdgesLength)
        Sets if compute edges length.
        Parameters:
        computeEdgesLength - True to compute edges length.
      • getUnitOfLength

        UnitOfLength getUnitOfLength()
        Gets the unit of length of map.
        Returns:
        The unit of length of map.
      • setUnitOfLength

        void setUnitOfLength​(UnitOfLength unitOfLength)
        Sets the unit of length of map.
        Parameters:
        unitOfLength - Unit of length of map.
      • removeAllIdleEventListener

        void removeAllIdleEventListener()
        Removes all idle event listener.
      • removeAllsZoomChangedEventListener

        void removeAllsZoomChangedEventListener()
        Removes all zoom changed event listener.
      • removeAllMouseMoveEventListener

        void removeAllMouseMoveEventListener()
        Removes all mouse move event listener.
      • removeAllRightClickEventListener

        void removeAllRightClickEventListener()
        Removes all right click event listener.
      • callbackContainsLocation

        void callbackContainsLocation​(GeoCoordinate coordinate,
                                      List<List<GeoCoordinate>> paths,
                                      Consumer<Boolean> callback)
        Executes callback to calculate whether the given coordinate exist inside the specified path.
        Parameters:
        coordinate - Coordinate to calculate if exist inside the specified path.
        paths - Polygon paths.
        callback - Callback to execute.
      • callbackContainsLocations

        void callbackContainsLocations​(HashMap<String,​GeoCoordinate> coordinates,
                                       List<List<GeoCoordinate>> paths,
                                       Consumer<HashMap<String,​Boolean>> callback)
        Executes callback to calculate whether the given coordinates exist inside the specified path.
        Parameters:
        coordinates - Coordinates to calculate if exist inside the specified path.
        paths - Polygon paths.
        callback - Callback to execute.
      • removeNode

        void removeNode​(BusinessObjectViewNode viewNode)
        Removes a node to map.
        Parameters:
        viewNode - Node to remove from map.
      • removeEdge

        void removeEdge​(BusinessObjectViewEdge viewEdge)
        Removes an edge to map.
        Parameters:
        viewEdge - Edge to remove from map.
      • addHeatmap

        Heatmap addHeatmap​(ViewHeatmap viewHeatmap)
        Adds a heatmap to be displayed by the map provider.
        Parameters:
        viewHeatmap - The heatmap to be displayed by the map provider.
        Returns:
        The heatmap displayed by the map provider.
      • removeHeatmap

        void removeHeatmap​(ViewHeatmap viewHeatmap)
        Removes a heatmap displayed by the map provider.
        Parameters:
        viewHeatmap - The heatmap displayed by the map provider.
      • addOverlayView

        MapOverlayView addOverlayView​(ViewOverlayView viewOverlayView)
        Adds a view overlay view to be displayed by the ma provider.
        Parameters:
        viewOverlayView - The view overlay view to be displayed by the map provider.
        Returns:
        The overlay view displayed by the map provider.
      • removeOverlayView

        void removeOverlayView​(ViewOverlayView viewOverlayView)
        Removes a view overlay view displayed by the map provider.
        Parameters:
        viewOverlayView - The view overlay view displayed by the map provider.