Geotools learning notes-maplayer

Source: Internet
Author: User

maplayer:

/* <Br/> * geotools-the open source Java GIS toolkit <br/> * http://geotools.org <br/> * (c) 2003-2008, open source geospatial Foundation (osgeo) <br/> * This library is free software; you can redistribute it and/or <br/> * modify it under the terms of the GNU lesser General Public <br/> * license as published by the Free Software Foundation; <br/> * version 2.1 of the license. <br /> * <Br/> * This library is distributed in the hope that it will be useful, <br/> * but without any warranty; without even the implied warranty of <br/> * merchantability or fitness for a particle purpose. see the GNU <br/> * lesser General Public License for more details. <br/> */<br/> package Org. geotools. map; </P> <p> Import Org. geotools. data. featuresource; <br/> Import Org. geotools. data. query; <Br/> Import Org. geotools. data. memory. collectionsource; <br/> Import Org. geotools. geometry. JTs. referencedenvelope; <br/> Import Org. geotools. map. event. maplayerlistener; <br/> Import Org. geotools. styling. style; <br/> Import Org. openGIS. feature. feature; <br/> Import Org. openGIS. feature. type. featuretype; </P> <p>/** <br/> * a layer to be rendered on a device. A layer is an aggregation of both a <br/> * {@ Li NK featurecollection}, A {@ link style} and, optionally, A {@ link query} <br/> * @ author Cameron shorter <br/> * @ author Martin desruisseaux <br/> * @ source $ URL: http://svn.geotools.org/trunk/modules/library/render/src/main/java/org/geotools/map/MapLayer.java $ <br/> * @ version $ ID: maplayer. java 30649 2008-06-12 19: 44: 08z acuster $ <br/> */<br/> Public interface maplayer {<br/>/** <br/> * Get the feature collection for this layer. <br/> * @ return the features for this layer, null if not yet set <br/> * or if {@ link source} is used. <br/> * return featuresource <br/> */<br/> featuresource <? Extends featuretype ,? Extends feature> getfeaturesource (); </P> <p>/** <br/> * get the data source for this layer. <br/> * @ return data source for this layer, null if not yet set <br/> * or if {@ link featuresource} is used <br/> */</P> <p> collectionsource getsource (); </P> <p>/** <br/> * Get the style for this layer. if style has not been set, then null is <br/> * returned. <br/> * @ return the style (SLD). <Br/> * return the style sheet of the layer <br/> */<br/> style getstyle (); </P> <p>/** <br/> * sets the style for this layer. if a style has not been defined a default <br/> * One is used. <br/> * @ Param style the new style <br/> * set the style sheet of the layer <br/> */<br/> void setstyle (Style style ); </P> <p>/** <br/> * get the title of this layer. if title has not been defined then an empty <br/> * string is returned. <br/> * <br/> * @ Return the title of this layer. <br/> * return the title of the layer <br/> */<br/> string gettitle (); </P> <p>/** <br/> * set the title of this layer. A {@ link layerevent} is fired if the new <br/> * title is different from the previous one. <br/> * @ Param title the title of this layer. <br/> */<br/> void settitle (String title ); </P> <p>/** <br/> * determine whether this layer is visible on a map pane or wh Ether the <br/> * layer is hidden. <br/> * @ return <code> true </code> If the layer is visible, or <code> false </code> <br/> * If the layer is hidden. <br/> * determine whether the layer is visible <br/> */<br/> Boolean isvisible (); </P> <p>/** <br/> * specify whether this layer is visible on a map pane or whether the layer <br/> * is hidden. A {@ link layerevent} is fired if the visibility changed. <br/> * @ Param v Isible show the layer if <code> true </code>, or hide the layer if <br/> * <code> false </code> <br/> */<br/> void setvisible (Boolean visible ); </P> <p>/** <br/> * returns the definition query (filter) for this layer. if no definition <br/> * query has been defined {@ link query. all} is returned. <br/> * The queryer of the returned layer <br/> */<br/> query getquery (); </P> <p>/** <br/> * sets a definition query for the layer W Ich acts as a filter for the <br/> * features that the layer will draw. <br/> * <p> <br/> * a consumer must ensure that this query is used in combination with the <br/> * bounding box filter generated on each map interaction to limit the <br/> * Number of features returned to those that complains both the definition <br/> * query and relies inside the area of interest. <br/> * </P> <br/> * <P> <br/> * important: only include attribute names in the query if you want them to <br/> * be always returned. it is desirable to not include attributes at all <br/> * but let the layer user (A Renderer ?) To decide wich attributes are actually <br/> * needed to perform its requiered operation. <br/> * </P> <br/> * @ Param query <br/> * Set layer queryer <br/> */<br/> void setquery (query ); <br/>/** <br/> * Find out the bounds of the layer <br/> * @ return-the layer's Bounds <br/> * return bounds <br/> */<br/> referencedenvelope getbounds (); <br/>/** <br/> * Add a listener to listen y when a layer property changes. changes include <br/> * layer visibility and the title text. <br/> * @ Param listener the listener to add to the listener list. <br/> * added an event listener for layer attribute changes <br/> */<br/> void addmaplayerlistener (maplayerlistener listener ); </P> <p>/** <br/> * removes a listener from the listener list for this layer. <br/> * @ Param listener the listener to remove from the listener list. <br/> */<br/> void removemaplayerlistener (maplayerlistener listener); <br/>}< br/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.