[Qgis-developer] Click-fu plugin

Maxim Dubinin sim at gis-lab.info
Sat Nov 1 22:57:52 EDT 2008


nice development of the idea Barry, I like it very much. I've tried to
install it and it gives me on load:

***********************************************************************
Couldn't load plugin clickfu due an error when calling its initGui() method

Traceback (most recent call last):
  File "", line 1, in 
  File "C:/Gis/QGIS\./python/plugins\clickfu\clickfu.py", line 25, in initGui
    self.googleMaps = googleMap(self.iface)
  File "C:/Gis/QGIS\./python/plugins\clickfu\googlemaps.py", line 11, in __init__
    cfAction.__init__(self,self.name(),iface)
  File "C:/Gis/QGIS\./python/plugins\clickfu\clickFuUtils.py", line 9, in __init__
    QAction.__init__(self,self.name(),iface.mainWindow())
AttributeError: mainWindow

Python version:
2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]

Python path:
['C:/Gis/QGIS\\./python', 'C:/Documents and Settings/mdubinin/.qgis//python/plugins', 'C:/Gis/QGIS\\./python/plugins', 'c:\\Gis\\QGIS\\Quantum GIS\\python', 'C:\\Gis\\QGIS\\python25.zip', 'C:\\Program Files\\Python\\Lib', 'C:\\Program Files\\Python\\DLLs', 'C:\\Program Files\\Python\\Lib\\lib-tk', 'C:\\Gis\\QGIS', 'C:\\Program Files\\Python', 'C:\\Program Files\\Python\\lib\\site-packages']
***********************************************************************

Maxim

Вы писали 1 ноября 2008 г., 18:33:20:

BR> I've just bashed out a new plugin, inspired by Maxim's google map
BR> plugin and his use of QDesktopServices::openUrl. Mine of course is in
BR> Python :)

BR> Click-fu adds a new drop-down menu with a list of geo-based web
BR> services. Currently there are three: Google maps, OpenStreetMap, and a
BR> GeoNames XML search. The first two display a map on your web browser
BR> when you click on a location after activating the tool, and the third
BR> one brings up the Geonames extended search XML at the clicked
BR> location. This lists country and subdivision and so on.

BR> If anyone can think of any other web services that just take a single
BR> lat-long pair then it's easy to add them, it takes about eight lines
BR> of code (most of that is boilerplate). In fact so much is boilerplate
BR> that it could be trivially easy to convert the plugin to just use a
BR> config file with some kind of spec for each web service. Then the user
BR> interface could include a config editor so you could add new web
BR> services yourself.

BR> Or I could add more configuration to the existing services - for
BR> example at the moment the zoom scale of google maps and openstreetmap
BR> is fixed.

BR> Or I could add web service searches that rely on a bounding box -
BR> geonames has a lot of these (www.geonames.org).

BR> Code is on google code:

BR>  svn checkout http://bsrplugins.googlecode.com/svn/trunk/clickfu clickfu

BR>  No installer yet, just extract and put in your plugins folder.
BR> Activate plugin from Manage Plugins, restart, click away.

BR>  Notes:

BR>   * It doesn't know if you've not got a lat-long coordinate system
BR> going, so can request things for lat=122323,lon=373424. Your web
BR> service might not like that.

BR>   * Needs Qgis Preview 1.0 - I think its just because 0.11 has
BR> getMainWindow and getMapCanvas whereas 1.0 has those without 'get'.

BR> Have fun with it...

BR> Barry
BR> _______________________________________________
BR> Qgis-developer mailing list
BR> Qgis-developer at lists.osgeo.org
BR> http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list