开发者

displaying tiled map in Gtk+ app

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 开发者_如何学Chere 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜