This file contains 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
class Species(db.Model): | |
authority = db.TextProperty() | |
classification = db.TextProperty() | |
names = db.TextProperty() | |
class SpeciesIndex(db.Model): | |
names = db.StringListProperty() | |
authorityName = db.StringProperty() | |
kingdom = db.StringProperty() | |
phylum = db.StringProperty() |
This file contains 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
#line 271 | |
#comment out, | |
"""make sure that the keyname exists in MOL""" | |
""" | |
q = Species.get_by_key_name(species_key_name) | |
if not q: | |
self.error(404) | |
return | |
""" | |
#line 278, 279 swap which line is commented out |
This file contains 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
renderMarkers: function(w,h,error){ | |
var cnvs = $("<canvas width="+w+" height="+h+">"); | |
var ctx = cnvs[0].getContext("2d"); | |
ctx.drawImage(this.pmBackground, 0, 0, w, h); | |
if (this.type){ | |
ctx.drawImage(this.pmType, 0, 0, w, h); | |
} | |
if (error){ |
This file contains 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
mol.ui.Map.MarkerCanvas = mol.ui.Element.extend( | |
{ | |
init: function() { | |
this._width = 120; | |
this._height = 120; | |
this._super('<canvas width='+this._width+' height='+this._height+'>'); | |
this.setStyleName('mol-MarkerCanvas'); | |
this._ctx = null; | |
this._canvasSupport = false; |
This file contains 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
/* Set up RightControl defaults */ | |
#mol-Map-RightControl { margin-right: 5px; width: 290px; } | |
#mol-Map-RightControl .TOP { position: relative; float: left; width: 100%; height: auto; margin-bottom: 5px; } | |
#mol-Map-RightControl .MIDDLE { position: relative; float: left; width: 100%; height: auto; margin-bottom: 5px; } | |
#mol-Map-RightControl .BOTTOM { position: relative; float: left; width: 100%; height: auto; margin-bottom: 5px; } | |
/* Set up CenterControl defaults */ | |
#mol-Map-CenterTopControl { margin-right: 5px; width: 290px; } | |
#mol-Map-CenterTopControl .TOP { position: relative; float: left; width: 100%; height: auto; margin-bottom: 5px; } | |
#mol-Map-CenterTopControl .MIDDLE { position: relative; float: left; width: 100%; height: auto; margin-bottom: 5px; } |
This file contains 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
result = { | |
SearchTerm: 'Puma', | |
SourceTypes : { | |
GBIFPoints : { | |
id: 1, | |
layers: [123, | |
0323, | |
434, | |
533,], | |
}, |
This file contains 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
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; | |
}); |
This file contains 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
# ------------------------------------------------------------------------------ | |
# TaxonomyService | |
class TaxonomyProvider(object): | |
def __init__(self): | |
pass | |
def _key(self, k): | |
raise NotImplementedError() | |
This file contains 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
class EcoregionLayerIndex(db.Model): #parent = an EcoregionSet | |
terms = db.CategoryProperty() | |
class EcoregionLayer(db.Model): | |
name = db.StringProperty() | |
id = db.StringProperty() | |
ecoCodes = db.ListProperty(db.Key) | |
class MOLLayers(db.Model): | |
layer = db.Key() |
This file contains 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
class OccurrenceSetIndex(db.Model): #parent = OccurrenceSet see below | |
terms = db.ListProperty() #string values to search for sets | |
class OccurrenceSet(db.Model): #key_name = wwf/puma_concolor or something | |
name = db.StringProperty() #this could be non-unique, Puma concolor is fine | |
source = db.StringProperty() #wwf | |
info = db.BlobProperty() #some meta standard for sets of occ polygons | |
class OccurrenceIndex(db.Model): #parent = OccurrencePolygon see below | |
introduced = db.BooleanProperty() |
OlderNewer