[OpenLayers-Users] Best Practices When Using OpenLayers 3 and AngularJS

Justin Leniger jtleniger at rothwellgroup.com
Thu May 28 07:38:45 PDT 2015


Hello,

I keep running into an inefficiency and it results from the different
methodologies used by AngularJS and OpenLayers.

OpenLayers has a very object oriented structure, with getters and setters.

AngularJS tends to prefer primitives and data-binding.



It would be nice to be able to, for example, use ng-model="myLayer.visible"
to 2 way bind some OpenLayers properties to an Angular control, however,
OpenLayers hides member variables and prefers getters and setters.

Is there any best practice for dealing with this, or perhaps some sort of
wrapper I can create to allow that data-binding again?



Thanks!

- Justin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20150528/1d905b8b/attachment.html>


More information about the Users mailing list