angular-mapboxgl-directive icon indicating copy to clipboard operation
angular-mapboxgl-directive copied to clipboard

Leaflet Instance

Open csimpi opened this issue 6 years ago • 1 comments

Hi, thank you for this directive, very helpful.

I'd like to use the leaflet-image plugin to make a snapshot.

Here is the example: https://www.mapbox.com/mapbox.js/example/v1.0.0/leaflet-image/

$scope.$on('mapboxglMap:load', function (event, mapboxglMapEvent) {
            $scope.mapInstance = mapboxglMapsData.getMapById('worldMap');
            leafletImage(map, function(){});
});

I'm getting getSize() function doesn't exists when the leafletImage plugin calls the getSize() function on the $scope.mapInstance object. Everything else like addLayer(),addSource() is working.

csimpi avatar May 16 '18 07:05 csimpi

Hi @csimpi!

I'm not familiar with leaflet-image plugin, but I think that this plugin only works with mapbox.js, not with mapboxgl. Could be that the problem?

Naimikan avatar May 23 '18 17:05 Naimikan