[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
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.8 cgi
Webserver = Apache
Database = mysqli 5.0.67-log, lock.system=flock
Toolkits = ArchiveUpload, Exif, NetPBM, Gd, Dcraw, LinkItemToolkit, jpegtran, Thumbnail, SquareThumb, ImageMagick
Acceleration = full/900, partial/900
Operating system = Linux infong 2.4 #1 SMP Tue Dec 18 22:34:10 UTC 2007 i686 GNU/Linux
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Rows in GalleryAccessMap table = 43
Rows in GalleryAccessSubscriberMap table = 5941
Rows in GalleryUser table = 12
Rows in GalleryItem table = 5928
Rows in GalleryAlbumItem table = 13
Rows in GalleryCacheMap table = 5861

 
miceno

Joined: 2007-11-20
Posts: 25
Posted: Sun, 2009-03-29 02:31

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.

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Tue, 2009-03-31 05:42

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...