You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.component.map.configuration.source.

Class XYZSource

  • All Implemented Interfaces:

    Serializable

    Direct Known Subclasses:

    OSMSource

    public class XYZSource
    extends TileImageSource

    Source for loading tiled images from a map service using the Slippy Map tile numbering scheme, also known as XYZ format.

    This is commonly used by OpenStreetMap, as well as other services who have adopted the OSM tile numbering scheme.

    See Also:

    Serialized Form

    • Constructor Detail

      • XYZSource

        public XYZSource()
    • Method Detail

      • getUrl

        public String getUrl()

        The URL template in XYZ format (see also Slippy map tilenames) used to load individual image tiles. The URL must include the x, y or -y, and z placeholders, where x and y identify the tile in the tile grid for the zoom level z.

        Example: https://a.tile.openstreetmap.org/{z}/{x}/{y}.png

        Overrides:

        getUrl in class UrlTileSource

        Returns:

        the URL template

      • setUrl

        public void setUrl​(String url)

        Sets the URL template in XYZ format.

        Overrides:

        setUrl in class UrlTileSource

        Parameters:

        url - the new URL template