/******************************************************************************* * Copyright (c) 2012 Association for Decentralized Information Management * in Industry THTH ry. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * VTT Technical Research Centre of Finland - initial API and implementation *******************************************************************************/ package org.simantics.maps.tile; import java.awt.Image; import java.awt.geom.Rectangle2D; import java.net.URI; import org.simantics.maps.ProvisionException; /** * @author Tuukka Lehtonen */ public interface ITileProvider { /** * @return an identifier for the tile provider connection. May represent any * protocol, not necessarily a web service at all. */ URI getSource(); /** * @return the bounding box of tiles served by this tile provider in degrees * [(-180,-90) x (180,90)] */ Rectangle2D getExtent(); /** * A synchronous method for requesting the specified map tile as a raster * image. * * @param key the requested tile * @return the tile as an image * @throws ProvisionException if any failure occurs while procuring the * image */ Image get(TileKey key) throws ProvisionException; }