Пример #1
0
 def __init__(self, *args, **kwargs):
     super(Module, self).__init__(*args, **kwargs)
     self.mapgrid = entities.Map(
         config.WIDTH,
         pygame.Rect(4, (config.WIDTH - config.HEIGHT) / 2,
                     config.WIDTH - 8, config.HEIGHT - 80))
     if (config.LOAD_CACHED_MAP):
         print("Loading cached map")
         self.mapgrid = entities.Map(
             config.WIDTH,
             pygame.Rect(4, (config.WIDTH - config.HEIGHT) / 2,
                         config.WIDTH - 8, config.HEIGHT - 80),
             "Loading cached map")
         map_data_location = 'map.cache'
         self.mapgrid.load_map(config.MAP_FOCUS, self.zoom)
     else:
         print("Loading map from the internet")
         self.mapgrid = entities.Map(
             config.WIDTH,
             pygame.Rect(4, (config.WIDTH - config.HEIGHT) / 2,
                         config.WIDTH - 8, config.HEIGHT - 80),
             "Loading map from the internet")
         self.mapgrid.fetch_map(config.MAP_FOCUS, self.zoom)
     self.add(self.mapgrid)
     self.mapgrid.rect[0] = 4
     self.mapgrid.rect[1] = 40
Пример #2
0
 def __init__(self, *args, **kwargs):
     super(Module, self).__init__(*args, **kwargs)
     if config.LOAD_CACHED_MAP:
         mapgrid = entities.Map(
             480, pygame.Rect(0, 0, config.WIDTH - 8, config.HEIGHT - 80),
             "Loading cached map")
         mapgrid.load_map(config.MAP_FOCUS, config.WORLD_MAP_FOCUS, True)
     else:
         mapgrid = entities.Map(
             480, pygame.Rect(0, 0, config.WIDTH - 8, config.HEIGHT - 80),
             "Fetching cached map")
         mapgrid.fetch_map(config.MAP_FOCUS, config.WORLD_MAP_FOCUS, True)
     self.add(mapgrid)
     mapgrid.rect[0] = 4
     mapgrid.rect[1] = 40
Пример #3
0
	def __init__(self, *args, **kwargs):
		super(Module, self).__init__(*args, **kwargs)
		#mapgrid = entities.MapGrid((-5.9302032, 54.5966701), (config.WIDTH - 8, config.HEIGHT - 80))
		mapgrid = entities.Map(480, pygame.Rect(0, 0, config.WIDTH - 8, config.HEIGHT - 80))
		mapgrid.fetch_map(config.MAP_FOCUS_BIG, 0.007)
		self.add(mapgrid)
		mapgrid.rect[0] = 4
		mapgrid.rect[1] = 40
Пример #4
0
 def __init__(self, *args, **kwargs):
     super(Module, self).__init__(*args, **kwargs)
     mapgrid = entities.Map(
         480, pygame.Rect(0, 0, config.WIDTH - 8, config.HEIGHT - 80))
     mapgrid.fetch_map(config.MAP_FOCUS, 0.1)
     self.add(mapgrid)
     mapgrid.rect[0] = 4
     mapgrid.rect[1] = 40
Пример #5
0
 def __init__(self, *args, **kwargs):
     super(Module, self).__init__(*args, **kwargs)
     #mapgrid = entities.MapGrid((-5.9302032, 54.5966701), (config.WIDTH - 8, config.HEIGHT - 80))
     self.mapgrid = entities.Map(
         config.WIDTH,
         pygame.Rect(4, (config.WIDTH - config.HEIGHT) / 2,
                     config.WIDTH - 8, config.HEIGHT - 80))
     self.mapgrid.fetch_map(config.MAP_FOCUS, 0.003)
     self.add(self.mapgrid)
     self.mapgrid.rect[0] = 4
     self.mapgrid.rect[1] = 40
Пример #6
0
	def __init__(self, *args, **kwargs):
		super(Module, self).__init__(*args, **kwargs)
		screen_width = user_config['video']['width'].get()
		screen_height = user_config['video']['height'].get()

		mapgrid = entities.Map(screen_width, pygame.Rect(4, (screen_width - screen_height) / 2, screen_width - 8, screen_height - 80))

		location = [user_config['map']['latitude'].get(), user_config['map']['longitude'].get()]

		mapgrid.fetch_map(location, 0.003)
		self.add(mapgrid)
		mapgrid.rect[0] = 4
		mapgrid.rect[1] = 40
Пример #7
0
	def __init__(self, *args, **kwargs):
		super(Module, self).__init__(*args, **kwargs)
		#mapgrid = entities.MapGrid((-5.9302032, 54.5966701), (config.WIDTH - 8, config.HEIGHT - 80))
		mapgrid = entities.Map(config.WIDTH, pygame.Rect(4, (config.WIDTH - config.HEIGHT) / 2, config.WIDTH - 8, config.HEIGHT - 80))
		if(config.LOAD_CACHED_MAP):
			print "Loading cached map"
			map_data_location = 'map.cache'
			mapgrid.load_map(config.MAP_FOCUS, 0.003)
		else:
			print "Loading map from the internet"
			mapgrid.fetch_map(config.MAP_FOCUS, 0.003)
		self.add(mapgrid)
		mapgrid.rect[0] = 4
		mapgrid.rect[1] = 40