def get_layers(self): for panel in DBSession.query(Panel).options(joinedload(Panel.samples)): yield Layer( panel.id, panel.name, PanelSamples(None).render(panel, self.req, dump=False), )
def get_layers(self): geojson = GeoJsonLects(self.ctx) for genus in self.ctx.genera: yield Layer(genus.id, genus.name, geojson.render(genus, self.req, dump=False), marker=map_marker_img(self.req, genus))
def get_layers(self): yield Layer( self.req.translate('Contribution'), self.req.translate('Contribution'), GeoJsonSelectedContributions(self.ctx.pk).render(self.ctx, self.req, dump=False))
def get_layers(self): properties = { "layer": "deepfamily" } #self.deepfamid, "name": self.deepfamname} features = [{ "type": "Feature", "geometry": { 'type': 'Point', 'coordinates': (lon, lat) }, "properties": { 'name': name, 'icon': self.icon_map[pk], "id": id_ }, "pk": pk, "description": None, "longitude": lon, "latitude": lat, "markup_description": None, "jsondata": {} } for (pk, name, lon, lat, id_) in self.protolanguages] #yield Layer(self.id, self.name, {"type": "FeatureCollection", "properties": properties, "features": features}) #print self.id #print features yield Layer( "deepfamily", self.deepfamname, { "type": "FeatureCollection", "properties": properties, "features": features })
def get_layers(self): yield Layer( 'languoids', 'Languoids', DescStatsGeoJson( (self.icon_map, None, self.focus)).render(self.ctx, self.req, dump=False))
def get_layers(self): """Generate the list of layers. :return: list or generator of :py:class:`clld.web.maps.Layer` instances. """ route_params = {'ext': 'geojson'} yield Layer('locations', 'Locations', self.req.route_url('languages_alt', **route_params))
def get_layers(self): for spec in self.value_map.values(): geojson = GeoJsonApicsWals(spec).render(self.ctx, self.req, dump=False) yield Layer( spec['number'], spec['name'], geojson, marker=HTML.img(src=spec['icon'], height=20, width=20), representation=len(geojson['features']))
def get_layers(self): if self.ctx.multivalued: yield Layer( self.ctx.id, self.ctx.name, self.req.resource_url(self.ctx, ext='geojson')) else: for layer in super(FeatureMap, self).get_layers(): yield layer
def get_layers(self): for layer in self.data['layers']: yield Layer( layer['properties']['number'], layer['properties']['name'], layer, marker=HTML.img( src=self.value_map[layer['properties']['number']]['icon'], height=20, width=20), representation=len(layer['features']))
def get_layers(self): for genus, languages in groupby(sorted(self.languages, key=lambda l: l.genus_pk), key=lambda l: l.genus): languages = list(languages) yield Layer(genus.id, genus.name, self.geojson_impl(languages).render(self.ctx, self.req, dump=False), marker=map_marker_img(self.req, genus), representation=len(languages))
def get_layers(self): for de in self.ctx.domain: yield Layer( de.id, de.name, self.req.resource_url( self.ctx, ext='geojson', _query=dict( domainelement=str(de.id), family=self.family.id if self.family else None, **self.req.query_params) ), marker=helpers.map_marker_img(self.req, de, marker=self.map_marker))
def get_layers(self): for canton, dialects in itertools.groupby( DBSession.query(models.Variety).order_by( models.Variety.canton, as_int(common.Language.id)), lambda l: l.canton): dialects = list(dialects) json = DialectsGeoJson(None).render(dialects, self.req, dump=False) yield Layer(slug(canton), canton, data=json, marker=HTML.span( helpers.map_marker_img(self.req, dialects[0], marker=self.map_marker), literal(' '), dialects[0].canton_img(self.req), literal(' ')))
def get_layers(self): yield Layer( 'isogloss', 'iso gloss', { "type": "FeatureCollection", "properties": { "layer": "isogloss", "name": "iso gloss" }, "features": [{ "type": "Feature", "geometry": { "type": "LineString", "coordinates": [[-100, 40], [-105, 45], [-110, 45], [-110, 55]] }, "properties": { "name": "Dinagat Islands" } }] })
def get_layers(self): yield Layer(self.ctx.id, self.ctx.name, get_geojson(self.req, self.ctx), marker=map_marker_img(self.req, self.ctx))
def get_layers(self): yield Layer('macroareas', 'macroareas', self.req.route_url('macroareas_geojson'))
def get_layers(self): yield Layer( self.ctx.id, self.ctx.name, LanguoidGeoJson( self.ctx, self.icon_map).render(self.ctx, self.req, dump=False))
def get_layers(self): geojson = GeoJsonLects(self.ctx) yield Layer('sample', 'Sample', geojson.render(self.ctx, self.req, dump=False))
def get_layers(self): geojson = GeoJsonLects(self.ctx) yield Layer(self.ctx.id, self.ctx.name, geojson.render(self.ctx, self.req, dump=False))
def get_layers(self): yield Layer( self.ctx.id, self.ctx.name, self.geojson((self.ctx, self.rel)).render(self.ctx, self.req, dump=False))
def get_layers(self): yield Layer('languages', 'Languages', self.req.route_url('languages_alt', ext='geojson'))
def get_layers(self): yield Layer('sample', 'Sample', get_geojson(self.req, self.ctx))
def get_layers(self): yield Layer('l1', 'ln1', [], representation=555) yield Layer('l2', 'ln2', [], representation=333)
def get_layers(self): yield Layer( self.ctx.id, self.ctx.name, GeoJson(self.ctx).render(self.ctx.language, self.req, dump=False))
def get_layers(self): yield Layer( self.ctx.id, self.ctx.name, self.req.resource_url(self.ctx, ext='geojson'))
def get_layers(self): yield Layer( 'ecoregions', 'WWF Eco Regions', self.req.route_url('ecoregions_alt', ext='geojson'))
def get_layers(self): for genus in self.ctx.genera: yield Layer(genus.id, genus.name, get_geojson(self.req, self.ctx, genus), marker=map_marker_img(self.req, genus))
def get_layers(self): yield Layer(self.ctx.id, self.ctx.name, get_geojson(self.req, self.ctx))
def get_layers(self): geojson = GeoJsonLects(self.ctx) yield Layer(self.ctx.id, self.ctx.name, geojson.render(self.ctx, self.req, dump=False), marker=map_marker_img(self.req, self.ctx))
def get_layers(req): return Layer('ecoregions', ECOREGIONS_TITLE, req.route_url('ecoregions_alt', ext='geojson'))
def get_layers(self): yield Layer( self.ctx.id, self.ctx.name, SampleGeoJson(self.ctx).render(self.ctx, self.req, dump=False))