Skip to content

qianyanseu/openlayers3-vectorlayer-source-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

openlayers3-vectorlayer-source-update

Example on how to update features for a vector layer by Updating features of a vectory layer every 5 seconds.

dependencies

  • OpenLayers 3
  • Apache or XAMPP

how to use

Put the ol-test folder under htdocs. Then go to http://localhost/ol-test/test.html in any browser.

key codes

When a feature update is needed, you just need to change the features property of vector data source:

vectorLayer.getSource().clear(); 
vectorLayer.getSource().addFeatures(features); 

About

Example on how to update features for a vector layer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages