def getAllHebergements(self): """ Returns all hebs that can be shown on map """ requestView = getMultiAdapter((self.context, self.request), name="utilsView") results = requestView.getAllHebergements() return makeJSON(results)
def getGoogleBlacklist(self): """ get list of google blacklisted items so javascript can check on it """ wrapper = getSAWrapper('gites_wallons') MapBlacklist = wrapper.getMapper('map_blacklist') query = select([MapBlacklist.blacklist_id], MapBlacklist.blacklist_provider_pk == 'google') googleBlacklist = [result.blacklist_id for result in query.execute().fetchall()] return makeJSON(googleBlacklist)
def getAllMapData(self): """ Returns all "other" map data for the map """ allMapDatas = self._fetcher.allMapDatas() return makeJSON(allMapDatas)
def getMapInfos(self): """ get info of default zoom and map center depending on context """ mapInfos = self._fetcher.mapInfos() return makeJSON(mapInfos)
def getHebergements(self): localHebergements = list(self._fetcher.fetch()) return makeJSON(localHebergements)