Search Posts

Category: angular-leaflet-directive

Moving the base layer hides the active overlay

I am using angular-leaflet-directive and moving or changing the zoom of the base map hides the active layer. In my example I have one base map and one overlay and if I inspect the page I have this: I have two overlayes instead of one overlay and one basemap and both with que same z-index. My code is: var layer = { baselayers: { xyz: { name: ‘OpenStreetMap’, url: ‘http://{s}{z}/{x}/{y}.png’, type: ‘xyz’ }, topo: { […]

angular-leaflet-directive with ecmascript6

I would use angular-leaflet-directive with ecmascript6. I see the map in the browser but i don’t see the path. I import the library this way: import angular from ‘angular’; import ‘leaflet/dist/leaflet.css’; // I’m not secure if this kind of references are a good practice import ‘angular-leaflet-directive/dist/angular-leaflet-directive’; import ‘leaflet/dist/leaflet’; import ‘./style.css’; import routes from ‘./routes’; import MapController from ‘./controller’; import MapService from ‘./service’; export default angular.module(‘map’, [‘leaflet-directive’] ) .config(routes) .controller(‘MapController’, MapController) .service(‘MapService’, MapService) .name; In this […]

Leaflet using inline svg as the base layer

Currently, I serve a map with an imageOverlay base layer. Right now, I need to use an svg instead of the current png imageOverlay, and to alter the svg css (like, changing opacity for the nearest places (paths in the svg) etc), dynamically, so basically, I need to control the actual map svg style dynamically. I’ve decided I need to use an inline svg to alter the style of the svg, instead of an image […]

Integrate Mapzen with Angular-Leaflet-Directive

Trying to integrate Mapzen’s geocoding services which provides a method to autocomplete location searches, with the Angular-Leaflet-Directive. I’m quite new to Angular, and don’t know how it all works yet, so I’ve probably not set everything up straight. The map works and all that, but when I add the map variable for the Mapzen-service, I get this error-message: Uncaught Error: Map container not found. I’m guessing it either has to do with the variable not […]