Skip to content

cavanaugh-ibm/leaflet-cloudant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leaflet-cloudant

js-semistandard-style

Allows you to manage several GeoJSON layers via a single control

var layer = new L.GeoJSON.Cloudant("geojson.json");

To add sources of data (with automatic refreshing)

layer.sourceAdd("colleges", "colleges.geojson", {onEachFeature: popUp, refreshSeconds: 30});

To change the source of data for a given layer

layer.sourceUpdate("colleges", "new.url");

To remove a given layer

layer.sourceRemove("colleges");

Make sure to load in the lodash library BEFORE this is included

<!-- Lodash -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js"></script>
<script src="leaflet.cloudant.js"></script> 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published