Example #1
0
 def get(self):
     builder = map_builder.MapBuilder(self.config, self.db)
     data, center = builder.prepare_jsons(None,
                                          center_icu=None,
                                          level='dept')
     return self.render('index.html',
                        API_KEY=self.config.GOOGLE_API_KEY,
                        center=center,
                        data=data,
                        version=icubam.__version__)
Example #2
0
 def get(self):
     locale = self.get_user_locale()
     builder = map_builder.MapBuilder(self.config, self.db, locale)
     level = self.get_query_argument('level', 'dept')
     data, center = builder.prepare_jsons(None, None, level=level)
     return self.render('map.html',
                        API_KEY=self.config.GOOGLE_API_KEY,
                        center=center,
                        data=data,
                        version=icubam.__version__)
Example #3
0
File: home.py Project: rth/icubam
 def get(self):
     locale = self.get_user_locale()
     builder = map_builder.MapBuilder(self.config, self.db, locale)
     data, center = builder.prepare_jsons(None,
                                          center_icu=self.icu,
                                          level='dept')
     return self.render('index.html',
                        API_KEY=self.config.GOOGLE_API_KEY,
                        center=center,
                        data=data,
                        version=icubam.__version__,
                        disclaimer_url=self.get_disclaimer_url())
Example #4
0
 def get(self):
     locale = self.get_user_locale()
     builder = map_builder.MapBuilder(self.config, self.db, locale)
     regions = [r.region_id for r in self.regions] if self.regions else None
     data, center = builder.prepare_jsons(None,
                                          center_icu=None,
                                          regions=regions,
                                          level='dept')
     return self.render('index.html',
                        API_KEY=self.config.GOOGLE_API_KEY,
                        center=center,
                        data=data,
                        version=icubam.__version__)
Example #5
0
 def initialize(self):
     super().initialize()
     self.builder = map_builder.MapBuilder(self.config, self.db)
Example #6
0
 def initialize(self, config, db_factory):
     super().initialize(config, db_factory)
     self.token_encoder = token.TokenEncoder(self.config)
     self.builder = map_builder.MapBuilder(config, self.db)