OpenLayers.Layer.Vector – OpenLayers 2

Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources. Create a new vector layer with the OpenLayers.Layer.Vector constructor. Listeners will be called with a reference to an event object. The properties of this event depends on exactly what happened. {Boolean} Whether the layer remains in one place while dragging the map. Note that setting this to true will move the layer to the bottom of the layer stack. {OpenLayers.Filter} The filter set in this layer, a strategy launching read requests can combined this filter with its own filter. {Array(String)} List of supported Renderer classes. Add to this list to add support for additional renderers. This list is ordered: the first renderer which returns true for the ‘supported()’ method will be used, if not defined in the ‘renderer’ option. {String} geometryType allows you to limit the types of geometries this layer supports. This should be set to something like “OpenLayers.Geometry.Point” to limit types. {Float} This specifies the ratio of the size of the visiblity of the Vector Layer features to the size of the map. Ask the layer to request features again and redraw them. Triggers the refresh event if the layer is in range and visible. Iterates through the available renderer implementations and selects and assigns the first one whose “supported()” function returns true. If there is no renderer set, the layer can’t be used. Remove it. Otherwise, give the renderer a reference to the map and set its size. Called at the end of the map.addLayer sequence. At this point, the map will have a base layer. Any autoActivate strategies will be activated here. Reset the vector layer’s div so that it once again is lined up with the map. Notify the renderer of the change of extent, and in the case of a change of zoom level (resolution), have the renderer redraw features. Remove features from the layer. This erases any drawn features and removes them from the layer’s control. The beforefeatureremoved and featureremoved events will be triggered for each feature. The featuresremoved event will be triggered after all features have been removed. To suppress event triggering, use the silent option. Draw (or redraw) a feature on the layer. If the optional style argument is included, this style will be used. If no style is included, the feature’s style will be used. If the feature doesn’t have a style, the layer’s style will be used. This function is not designed to be used when adding features to the layer (use addFeatures instead). It is meant to be used when the style of a feature has changed, or in some other way needs to visually updated after it has already been added to a layer. You must add the feature to the layer for most layer-related events to happen. {OpenLayers.Feature.Vector} A feature corresponding to the given property value or null if there is no such feature. {OpenLayers.Feature.Vector} A feature corresponding to the given featureId or null if there is no such feature. {OpenLayers.Feature.Vector} A feature corresponding to the given featureFid or null if there is no such feature. Returns an array of features that have the given attribute key set to the given value. Comparison of attribute values takes care of datatypes, e.g. the string ‘1234’ is not equal to the number 1234. Array({OpenLayers.Feature.Vector}) An array of features that have the passed named attribute set to the given value. method called after a feature is inserted. Does nothing by default. Override this if you need to do something on feature updates. method called before a feature is inserted. Does nothing by default. Override this if you need to do something when features are first added to the layer, but before they are drawn, such as adjust the style. Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 22, 2016 @ 7:12 pm