/* * This is part of Geomajas, a GIS framework, http://www.geomajas.org/. * * Copyright 2008-2015 Geosparc nv, http://www.geosparc.com/, Belgium. * * The program is available in open source according to the GNU Affero * General Public License. All contributions in this program are covered * by the Geomajas Contributors License Agreement. For full licensing * details, see LICENSE.txt in the project root. */ package org.geomajas.plugin.jsapi.client.map; import org.geomajas.annotation.Api; import org.geomajas.plugin.jsapi.client.map.layer.Layer; import org.timepedia.exporter.client.Export; import org.timepedia.exporter.client.Exportable; /** * Javascript exportable facade for the model of layers that form a map. * * @author Oliver May * @author Pieter De Graef * @since 1.0.0 */ @Api(allMethods = true) @Export public interface LayersModel extends Exportable { /** * Get a single layer by its identifier. * * @param id * The layers unique identifier within this map. * @return Returns the layer, or null if it could not be found. */ Layer getLayer(String layerId); /** * Return the layer at a certain index. If the index can't be found, null is returned. * * @param index * The specified index. * @return Returns the layer, or null if the index can't be found. */ Layer getLayerAt(int index); /** * Return the total number of layers within this map. * * @return The layer count. */ int getLayerCount(); }