Re: Connecting event to underlying actor widget
- From: Nicolas Évrard <nicoe altern org>
- To: libchamplain-list gnome org
- Subject: Re: Connecting event to underlying actor widget
- Date: Tue, 29 Nov 2011 19:51:44 +0100
* Gerard Toonstra [2011-11-25 09:35 +0100]:
Hello,
Thank you for your answers.
You can create your own map sources this way, for now, until the other
method starts working:
def set_map_chain(self, view, tile_size, id, name, minzoom, maxzoom,
url, file_cache_size, img_cache_size):
map_chain = Champlain.MapSourceChain()
errorRenderer = Champlain.ErrorTileRenderer.new( tile_size )
null_source = Champlain.NullTileSource.new_full( errorRenderer )
map_chain.push( null_source )
imgrenderer = Champlain.ImageRenderer()
tile_source = Champlain.NetworkTileSource.new_full(
id,
name,
"license",
"license-uri",
minzoom,
maxzoom,
tile_size,
Champlain.MapProjection.MAP_PROJECTION_MERCATOR,
url,
imgrenderer )
map_chain.push( tile_source )
map_chain.push( Champlain.FileCache.new_full( file_cache_size,
None, imgrenderer ) )
map_chain.push( Champlain.MemoryCache.new_full( img_cache_size,
imgrenderer ))
view.set_map_source( map_chain )
-----------------------
self.set_map_chain( mapview.get_view(), 256, "local", "Localhost
Sources", 0, 17, "http://localhost/tiles/#Z#/#X#/#Y#.png", 100000, 100 )
mapsources = self.get_map_sources()
mapsources = {}
mapsources[ "local" ] = "local"
If I understand the code correctly you're creating a new tile source
that will deliver the tiles from an http server on localhost. That
might be interesting.
Do you know how I can use a specified map source ? For example the
satellite map ?
--
(°> Nicolas Évrard
( ) Liège
`¯
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]