On Jul 23, 2010, at 9:02 AM, feverzsj wrote:
> hi, list
> I found that lots of people like me were eager for some ready-to-use stuff
> which can just view the map and make some on-the-fly modification to the
> map(like turn on/off or change the proj of layer/map) and see the result
> immediately.
Absolutely, thanks already for your nice contributions on this level - the pyqt
approach looks great.
> The c++ viewer in demo need to be complied and there are some external
> dependencies. Though, I complied it out, it just won't run for some unknown
> reason(I've post a related mail).
Yes, its quite a slick application, simple and useful. But it surely is not
going to get to users unless we provide binaries - which is on the list of
course, but has not found its way to the top yet...
> Quantumnik requires QGIS and some python modules to be installed first. Since
> QGIS uses its own copy of python2.5, the module installation seems not simple
> as usual.
That depends on the way that QGIS was built, but yes on windows the author has
decided to bundle python25 inside the QGIS download which makes it a bit of a
pain to get mapnik's python bindings recognized, but it can be done.
> Last week, I wrote a pyqt4 widget(MapnikWidget) that can view/zoom/pan the
> map with mouse, just simple enough.
Which is quite nice, because its lightweight.
> This week, I've made some modification to the widget.
Nice, I notice the new zoom-in based on mouse location - very nice :)
> It is now able to build up a QStandardItemModel and optionally a QTreeView to
> display/modify the attributes of map and its layers.
I tried this on mac osx and could not get anything to appear...
Perhaps related?
Traceback (most recent call last):
File "main_window.py", line 81, in on_actionOpen_triggered
map_widget.open(q2py(xml))
File "/Users/dane/Desktop/MapnikWidget.py", line 146, in open
self.buildMapTree()
File "/Users/dane/Desktop/MapnikWidget.py", line 95, in buildMapTree
self.root.appendRow(_build_nvp('background',
self.map.background.to_hex_string(), True))
AttributeError: 'NoneType' object has no attribute 'to_hex_string'
> I've also written a MDI based pyqt4 program as a example(the viewer).
> There still may be some bugs. I've only tested it on win32 platform.
>
> mapnik map viewer features:
> 1. Open and view multiple mapnik maps in one MDI area. Drag to pan and wheel
> to zoom map.
> 2. A dockable widget shows a tree view of map's attributes of current
> activated subwindow in the MDI area. The value of blue name can be modified.
> For boolean values, '1'/'ture'/'on'(case-insensitive) are for True, any
> string else is for False. Click "update to map" to update the modification to
> the map immediately.
> 3. "zoom all" to zoom all the map of current activated subwindow.
> 4. "reload" to reload the map of current activated subwindow. This is
> convenient to view the map after you have finished editing the map xml in
> your favorite editor.
Sounds promising! great job.
>
> I use:
> python2.6
> mapnik0.71
> PyQt-Py2.6-gpl-4.7.3-2
>
>
> In the zip attachment:
> __init__.py : just empty
> MapnikWidget.py : the mapnik widget
> main_window.py : the viewer's mainwindow and entrance, run this script to
> show the viewer.
> Ui_main_window.py : compiled qt4 form
> main_window.ui : qt4 form file
> eric4proj.e4p : eric4 project of the viewer
>
>
> p.s. The nabble proxy of mapnik-devel seems broken. There is only on post
> there. Hope someone can fix that. Nabble is very convenient while outside.
> The mail-archive.com is blocked by the nation's fire wall.
I've never looked at nabble for mapnik - can you advice on what you think might
need to be done to fix it?
>
> --Regards, zsj
>
> //
> <mapnik viewer.rar><viewer.jpg>_______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users