All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.flow.component.map.configuration.Extent Maven / Gradle / Ivy

There is a newer version: 24.6.0
Show newest version
package com.vaadin.flow.component.map.configuration;

/*
 * #%L
 * Vaadin Map
 * %%
 * Copyright (C) 2022 - 2022 Vaadin Ltd
 * %%
 * This program is available under Commercial Vaadin Developer License
 * 4.0 (CVDLv4).
 *
 * See the file license.html distributed with this software for more
 * information about licensing.
 *
 * For the full License, see .
 * #L%
 */

/**
 * Defines an area within a map using min/max coordinates. The coordinates are
 * by default in {@code EPSG:3857} / Web Mercator Sphere projection, unless the
 * map's {@link View} uses a custom projection.
 */
public class Extent {
    private final double minX;
    private final double minY;
    private final double maxX;
    private final double maxY;

    public Extent(double minX, double minY, double maxX, double maxY) {
        this.minX = minX;
        this.minY = minY;
        this.maxX = maxX;
        this.maxY = maxY;
    }

    public Extent() {
        this(0, 0, 0, 0);
    }

    public double getMinX() {
        return minX;
    }

    public double getMinY() {
        return minY;
    }

    public double getMaxX() {
        return maxX;
    }

    public double getMaxY() {
        return maxY;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy