origo-map / draw-plugin

Draw tool plugin for Origo
MIT License
1 stars 4 forks source link

Updated UI #12

Closed tonnyandersson closed 4 years ago

tonnyandersson commented 4 years ago

Fixes #11.

Init plugin like this:

<script type="text/javascript">
  //Init origo
  var origo = Origo('index.json');
  origo.on('load', function (viewer) {
    var draw = Draw({
      buttonText: 'Rita',
      drawTools: {
        "Polygon": ["freehand", "box"],
        "LineString": ["freehand"]
      }
    });
    viewer.addComponent(draw);
  });
</script>

Please note that this update requires the very latest version of Origo master.