tags:

views:

14

answers:

1

Hi

I am about to embark on a project that will involve a GUI application that will need to display a map interface, generated from a global map tile cache (on local disk) at different levels of zoom.

The app will be written using Gtk, and while I am fairly familiar with the basic Gtk widgets, I am unsure how to approach the map interface component. There are various widgets that look like they might be a good start (frames, layouts, viewports), but I would like to know how others might approach the same problem.

Some specific aspects I would like advice on:
- Is it possible to have an image (say 1000x1000) but only display a section (say 500x500) in the interface? The idea here is that missing tiles can be added to the hidden part of the image as the map is being scrolled, so there are no visible missing tiles.
- Being able to scroll the map by using the mouse to grab and drag the image.
- Being able to draw interactive overlays ontop of the map. E.g. a small icon representing a place-mark, that responds to tooltip and mouse-button events.

Any open source gtk apps that do something similar that I can use as a reference would be great.

Cheers

+1  A: 

I have done it but in code that I cannot share. My current implementation uses a modified geoc (http://geocanvas.sourceforge.net/geoc/index.html), SqlLite with Spatialite, and GDAL. There is something called champlain which may work for your situation but that uses Clutter.

Rubinium
Thanks for the suggestions. My project will probably be using Perl/Gtk, so I wont be able to use geocanvas directly (it seems to be all python), but it should yield some good ideas.
megamic
It has python bindings but it is written in C.
Rubinium
Hmmm I wonder how crazy I would be to consider writing Perl bindings for it...but It does look very much like what I want.
megamic