Created
March 28, 2011 14:32
-
-
Save eightysteele/890567 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Setup app: | |
| var mol = MOL(function(mol) { | |
| bus = new mol.events.Bus(); | |
| api = new mol.ajax.Api(bus); | |
| var config = {bus: bus, api: api, logging:true}; | |
| var app = new mol.app.Instance(config); | |
| app.run(); | |
| return this; | |
| }); | |
| // Add points: | |
| var layer = new mol.model.Layer('points', 'gbif', 'puma concolor'); | |
| var request = {layer: layer, action:'load-layer'}; | |
| var failure = function(json){}; | |
| var success = function(json){}; | |
| api.execute(request, success, failure); | |
| // Detele points: | |
| bus.trigger('delete_layer', 'points_gbif_puma_concolor'); | |
| // Test ColorSetter | |
| var color = new mol.core.ColorSetter.Color(1, 2, 3); | |
| bus.trigger('set_layer_color', 'points_gbif_puma_concolor', color); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment