Class MapClickEvent

    • Constructor Detail

      • MapClickEvent

        public MapClickEvent​(Map source,
                             boolean fromClient,
                             elemental.json.JsonArray coordinate,
                             @EventData(" =>")
                             elemental.json.JsonArray featureIds,
                             @EventData(" =>")
                             elemental.json.JsonArray layerIds,
                             int pageX,
                             int pageY,
                             boolean altKey,
                             boolean ctrlKey,
                             boolean metaKey,
                             boolean shiftKey,
                             int button)
    • Method Detail

      • getCoordinate

        public Coordinate getCoordinate()
        Gets the coordinate of the click on viewport
        coordinate of the click, in the view's projection.
      • getFeatures

        public List<FeatureEventDetails> getFeatures()
        List of map features at the clicked position. Can be used to distinguish whether the click was on the background, or on a feature. The features are sorted by their display order, meaning the top-most feature is the first item in the list.
        the list of features at the clicked position, or an empty list otherwise
      • getMouseDetails

        public MouseEventDetails getMouseDetails()
        Gets the click's mouse event details.
        mouse event details