Class OsmPrimitiveImageProvider

    • Method Detail

      • getResource

        public static ImageResource getResource​(OsmPrimitive primitive,
                                                java.util.Collection<OsmPrimitiveImageProvider.Options> options)
        Returns an ImageIcon for the given OSM object, at the specified size. This is a slow operation.
        Parameters:
        primitive - Object for which an icon shall be fetched. The icon is chosen based on tags.
        options - zero or more options.
        Returns:
        Icon for primitive that fits in cell or null.
        Since:
        15889
      • getResource

        public static java.util.Optional<ImageResourcegetResource​(java.lang.String key,
                                                                    java.lang.String value,
                                                                    OsmPrimitiveType primitiveType)
        Searches for an icon for the given key/value and primitiveType
        Parameters:
        key - The tag key
        value - The tag value
        primitiveType - The type of the primitive
        Returns:
        an icon for the given key/value and primitiveType