L.mapbox
originates from Mapbox's unique implementation of Leaflet called Mapbox.js. On the other hand, angular-leaflet-directive utilizes the standard Leaflet library, offering a different approach to defining markers and other options.
With angular-leaflet-directive, there's no need for an additional <div>
for the map; you simply include the following code:
<leaflet id="map" class="leafletmap" defaults="myDefaults" markers="markers" lf-center="center" height="300px" width="785px"></leaflet>
To incorporate a zoomControl
on the map, you can add defaults="myDefaults"
to the directive and then define the Leaflet default options in your controller like this:
angular.extend($scope, {
defaults: {
scrollWheelZoom: false
}
}
An example implementation can be seen here: https://plnkr.co/edit/rZbuHmAwA7q7WtBAZg4W
For more examples, refer to the angular-leaflet-directive documentation.