[map] How to add quick-edit button to photo-view
miceno
Joined: 2007-11-20
Posts: 25 |
Posted: Sat, 2009-03-28 23:45 |
I have been using the "Google Map" module for a while and it is a real nice module. As I have uploaded more than 6000 historic photos (http://fotos.arxiuhistoricpoblenou.es), and as I am planning to geo-position all of them, I would like to find a quick way to allow editing of the coordinates of a photo in just 1-click. I am planning to add a block to Google Map Module in order to put an "edit coordinates" button that directly opens the map to select coordinates. I have intuition, but poor knowledge of the Google Map module. My guess is that I can start from the code that is already in place in the ShowMap.inc module and in the template mapItemEdit.tpl. Anyway, I will appreciate any suggestion or tip to start. Quote:
Gallery URL = http://fotos.arxiuhistoricpoblenou.es/main.php |
|
Posts: 25
In fact, I have solved it by my own means.
Here it is the set of changes I started:
* Create a new block called "Quick Edit Coordinates" in file ./templates/blocks/quickEdit.tpl
* Modify ./templates/blocks/blocks.inc accordingly
* Modify ShowMap.inc to adjust the way the View returns when coordinates are saved or cancelled. In this case, we create a new "plugin" action called quickEdit
I hearby attach the three files. Changes are made from the version of the plugin that is available in the Community Repository for download through the administrative interface of Gallery2. The source code version is 1594, and the version of the module is 0.5.8.
I have checked there is a new version of the Google Map module in the SVN repository at SourceForge. I have not installed this version but it looks like there are several enhancements. I will have a look at it in the near future and then I will post the changes to create the new block.
I am not pretty sure about the way to include the code in the main source code, and then allow other users to have this functionality ready in the repository. So I am posting the code here.
Posts: 508
Thanks. I'll take a look at it when I have a chance. The gmap-module SourceForge repository is the development code (but I generally try to keep it stable). When I finish a version I publish it to the community repository so that it will be available through Downloadable Plugins. Right now the gmap-module repository is not too far ahead of 0.5.8. I've been absolutely swamped with overtime at work for the last 3 months, so I haven't worked on the module at all. I dunno when that will change, hopefully soon...