Closed carsnwd closed 6 years ago
My imports weren't working correctly.
<script src="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.min.js"></script>
<script src="https://code.angularjs.org/1.4.0/angular.min.js"></script>
<script src="https://code.angularjs.org/1.4.0/angular-sanitize.min.js"></script>
<script src="https://tombatossals.github.io/angular-openlayers-directive/dist/angular-openlayers-directive.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.min.css" />
<link rel="stylesheet" href="http://tombatossals.github.io/angular-openlayers-directive/dist/angular-openlayers-directive.css" />
Is this a new project you're starting with Angular? If so, consider using the new Angular version (angular.io). The library is written for AngularJS (v1.x) 🙂
I'm very new to AngularJS, as in this is my first project I'm trying to work on with it.
I have a JSFiddle here.
I'm having issues where my module is not loading my map, giving an Error: $injector:modulerr Module Error. I'm fairly certain I instantiated my module correctly with...
var app = angular.module("MapApp", ["openlayers-directive"]);
My though maybe is it's erroring out due to the open-layers directive being passed in, and I'm somehow not setting that up correctly.
Any help? Thanks.