datamaps is also delivered as a jQuery/Zepto plugin, as shown in this example (in addition to a Backbone view).
datamaps will add datamap
to an existing version of jQuery if it's on the page. Otherwise, if there is no jQuery/Zepto, it will add a global copy of Zepto for you to use.
Add a container div to the page and select with jQuery/Zepto and call the datamap
function. Pass customization options to datamap
.
This example shows a custom popup function (any JS templating language that compiles to a function like _.templates and handlebars).
The custom template has two model objects
- geography (which includes things like 'name' and the GPS coordinates)
- data (which includes the object you passed into
data
when instantiating the map)
Data source: List of ongoing military conflicts
Do you mean to use the geography_config key?
https://gist.github.com/KevinSchmid/5260484/revisions