Re: Connecting event to underlying actor widget



Hi,

Sorry for replying so late to this, swamped with other stuff.

Here's a guide that explains how to render openstreetmap data locally using postgres with postgis extensions.
I use the newest Ubuntu and that has everything in the repo's, so you don't need to compile latest versions anymore:

http://wiki.openstreetmap.org/wiki/Mapnik

The wiki also displays where you can download osm data from. It's best to focus on particular areas. If you do the
Benelux or one region of the UK, you should expect 3 days of rendering if you go down to the 17th/18th zoom level,
done on a single machine dual-core reasonably spec'd.


Satellite data isn't free. But if it would be available, then serving that and chopping it up should be relatively straightforward.
Probably costs millions though.

Rgds,

Gerard

On Tue, Nov 29, 2011 at 7:51 PM, Nicolas Évrard <nicoe altern org> wrote:
* 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

--
Gerard Toonstra
-----------------------
http://www.radialmind.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]