angular-openlayers-directive markers

by maxibaezpy

HTML

<script src="http://tombatossals.github.io/angular-openlayers-directive/bower_components/angular/angular.min.js"></script>
<script src="http://tombatossals.github.io/angular-openlayers-directive/bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="http://openlayers.org/en/v3.10.1/build/ol-debug.js"></script>
<link rel="stylesheet" href="http://openlayers.org/en/v3.10.1/css/ol.css">
<script src="https://rawgit.com/tombatossals/angular-openlayers-directive/latest/dist/angular-openlayers-directive.js"></script>
<body ng-controller="DemoController">
  <openlayers class="col s12" height="400px" zoom="5" ol-center="center">
      <ol-marker 
        lat="marker.lat" 
        lon="marker.lon" 
        message="{{marker.message}}"> 
        </ol-marker>
  </openlayers>
</body>

JavaScript

var app = angular.module('demoapp', ['openlayers-directive']);


app.controller('DemoController', ['$scope', function($scope) {
  angular.extend($scope, {
    center: {
      lat: 39.92,
      lon: 116.38,
      zoom: 3
    }
  });
  
 	$scope.marker ={
  	lat: 39.92,
    lon: 116.38,
    message:"Marcador de prueba"
  } 
}]);