Class: Mapv

ol.source.Mapv

The MapV layer calss

new ol.source.Mapv(opt_options)

Mapv.js, line 9
Name Type Default Description
opt_options Object

Options of mapV layer.

Name Type Description
map ol.Map

the map object for OpenLayers.

dataSet Mapv.DataSet

Mapv's data set.

mapvOptions Object

Mapv configuration object.

opt_option.logo string optional

Logo.

opt_options.projection ol.proj.Projection optional

Projection information.

opt_options.ratio number 1.5 optional

View ratio, 1 means that the canvas is the size of the map viewport, 2 means that the canvas is twice the width and height of the map viewport, and so on. Must be 1 or higher.

opt_options.resolutions Array optional

Resolution array.

opt_option.state ol.source.State optional

Resource status.

opt_option.attributions string | Object '© 2017 百度 MapV with <span>© <a href='https://iclient.supermap.io' target='_blank'>SuperMap iClient</a></span>' optional

Copyright information.

Extends

  • ol.source.ImageCanvas

Methods

addData(data, options)

Mapv.js, line 85

Add data to the layer.

Name Type Description
data Object

Data needs to add.

options Object

Other options needs to add.

clearData()

Mapv.js, line 123

Clear data.

getData(){mapv.DataSet}

Mapv.js, line 95

Get data.

Returns:
Type Description
mapv.DataSet Dataset of mapV layer.

removeData(filter)

Mapv.js, line 107

Remove data that conforms to the filter conditions.

Name Type Description
filter function

The filters. The parameter to pass in is data item. If returns true, the data is deleted; otherwise the data is not deleted.

Example
filter=function(data){
   if(data.id=="1"){
     return true
   }
   return false;
 }

update(options)

Mapv.js, line 132

Update the layer.

Name Type Description
options Object

Data to update.

Name Type Description
data Object

Dataset of mapV layer.