Package Exports
- leaflet-ant-path
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (leaflet-ant-path) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Leaflet Ant Path
Creates a leaflet polyline with a 'ant-path' animated flux
Requirements
- Leaflet >= 0.7.7
Browser compatibility
Tested on:
- Firefox 43
- Chrome 45
- Chromium 47
UMD compatible
Can be used with asynchronous module loaders and CommonJS packers
Using the plugin
It's just like a polyline:
// ...
var antPolyline = new L.AntPath(latlngs, options);
antPolyline.addTo(map);
Using with AMD:
require(['leafletAntPath'], function(AntPath) {
// ...
var antPolyline = new AntPath(latlngs, options);
antPolyline.addTo(map);
});
Using with browerify:
var AntPath = require('leafletAntPath');
// ...
var antPolyline = new AntPath(latlngs, options);
antPolyline.addTo(map);
Parameters
The AntPath extends from the FeatureGroup, but you initialise with the same options of a common Polyline, with some extra options, like the flux color.
name | type | example | description |
---|---|---|---|
latlngs | L.LatLng[] or Array[number, number] | [ [0, 10], [-20, 0], ... ] | A array of latitude and longitudes (same as used in Polyline constructor ) |
options | Object | {fluxColor: 'red', ...} | Same as the Polyline options plus the fluxColor option |
Building and Testing
To run the build, before install the npm and gulp dependencies, then run:
To build
gulp style
...
gulp compress
To test:
gulp test
License
This project is under the MIT LICENSE