https://github.com/rmosolgo/batmanjs-leaflet-example
Example Batman.js App with custom view for wrapping leaflet.js
https://github.com/rmosolgo/batmanjs-leaflet-example
Last synced: 3 months ago
JSON representation
Example Batman.js App with custom view for wrapping leaflet.js
- Host: GitHub
- URL: https://github.com/rmosolgo/batmanjs-leaflet-example
- Owner: rmosolgo
- Created: 2014-05-01T03:24:34.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-05-01T03:27:55.000Z (over 11 years ago)
- Last Synced: 2024-12-28T03:42:17.607Z (about 1 year ago)
- Language: JavaScript
- Size: 395 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Using Leaflet.js with Batman.js
[Live on Bl.ocks](http://bl.ocks.org/rmosolgo/11443841)
This is a proof-of-concept custom `Batman.View` that ties batman.js structures to [leaflet.js](http://leafletjs.com). I've always liked leaflet and I wanted to give it a try!
The whole application is [in this gist](http://bl.ocks.org/rmosolgo/11443841) as `application.coffee`, with the templates preloaded in the compiled `application.js` (implemented in [`Gulpfile.js`](https://github.com/rmosolgo/batmanjs-leaflet-example/blob/master/Gulpfile.js)).
You can also see the [leaflet view file](https://github.com/rmosolgo/batmanjs-leaflet-example/blob/master/coffee/leaflet_view.coffee).
This custom view is an example of:
- Beefy batman.js view for using another JS library
- exposing options with `@option` in the view definition
- using [gulp.js to build batman.js apps](https://github.com/rmosolgo/batmanjs-leaflet-example/blob/master/Gulpfile.js)
- Using a [`Batman.SetObserver` in application code](https://github.com/rmosolgo/batmanjs-leaflet-example/blob/master/coffee/leaflet_view.coffee#L174-L180)