Thank You, all, for this module.
I can, at times, be very dense -and- ask lame questions. Please be patient with me.
- I find that the call to use the 'convert' command in MapSiteAdmin.inc resulted in
the command not being found. I had to provide a path to it.
- I have been trying to get map-module-0.3.2b working.
I installed, activated and configured it. I configured the information in 'Custom Fields'
for a single photo. The only way I am able to get to a map is to place the 'Go Back to the Map'
href outside og the 'if' in photo.tpl. When I go to the photo I see the link and clicking on it
produces the map.
- I tried dowloading the latest (map-module-0.4.0.zip) to try it. I deactivated and uninstalled 0.3.2,
deleted template cache, mv'd the old map out of modules and put the new map in. I installed and
activated the new map module; but, upon trying to go to 'Google Map Settings' I am met with:
Warning: assert(): Assertion "!empty($ids)" failed in /opt/csw/apache/htdocs/gallery/modules/core/classes/GalleryStorage/DatabaseStorage.class on line 2059
Any pointers/help/??? is appreciated.
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 21:24
jcampbell1 wrote:
Not to beat a dead horse, but I think breaking the dependancy on customfields is a good idea. I added a "get coordinate" link next to the input field to help find the coordinate by double clicking a location on the map.
This was already in the module for a while now .... ?
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 21:28
jcampbell1 wrote:
In terms of autozoom, I have a function that takes a set of coordinates and map size and returns the ideal zoom and center. At this point, it is not that useful, but may be handy if the module implements the plotting of only groups of points. I can share the code, when I return home from work.
It will be nice to implement that, if you send me the code I can add an entry in the AdminPanel so that we can choose to use AutoCenter or not
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 21:33
galmoid wrote:
- I find that the call to use the 'convert' command in MapSiteAdmin.inc resulted in
the command not being found. I had to provide a path to it.
The module should gather the value of the path directly from the Imagemagick module, if this one isn;t found there would be no path specified and so the "%PATH%" variable would be use to locate the binary...
I'm not sure why you need to specify the path manually, I'd like to fix this bug if posssible
galmoid wrote:
- I have been trying to get map-module-0.3.2b working.
I installed, activated and configured it. I configured the information in 'Custom Fields'
for a single photo. The only way I am able to get to a map is to place the 'Go Back to the Map'
href outside og the 'if' in photo.tpl. When I go to the photo I see the link and clicking on it
produces the map.
I think I need to add some sort of a guide on how to setup the map.
This is normal behaviour, the map only shows up when you go to a certain URL (http://yourdmain/youpathtofallery/main.php?view=map.Showmap)
galmoid wrote:
- I tried dowloading the latest (map-module-0.4.0.zip) to try it. I deactivated and uninstalled 0.3.2,
deleted template cache, mv'd the old map out of modules and put the new map in. I installed and
activated the new map module; but, upon trying to go to 'Google Map Settings' I am met with:
Warning: assert(): Assertion "!empty($ids)" failed in /opt/csw/apache/htdocs/gallery/modules/core/classes/GalleryStorage/DatabaseStorage.class on line 2059
Any pointers/help/??? is appreciated.
That is because you have no GPS coordinate set in any album yet, I tried to explain it in the posting but I guess it wasn't clear enought
Also, I thought I had fixed it ... guess not ...
I'll be looking at that in more details
Thanks for the input !
--------------------------
The Termite
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 22:04
Quote:
galmoid wrote:
- I tried dowloading the latest (map-module-0.4.0.zip) to try it. I deactivated and uninstalled 0.3.2,
deleted template cache, mv'd the old map out of modules and put the new map in. I installed and
activated the new map module; but, upon trying to go to 'Google Map Settings' I am met with:
Warning: assert(): Assertion "!empty($ids)" failed in /opt/csw/apache/htdocs/gallery/modules/core/classes/GalleryStorage/DatabaseStorage.class on line 2059
Any pointers/help/??? is appreciated.
That is because you have no GPS coordinate set in any album yet, I tried to explain it in the posting but I guess it wasn't clear enought
Also, I thought I had fixed it ... guess not ...
Ok I got it solved this time for real
In MapSiteAdmin.inc on line 743:
change If (!empty($results))
for If (!empty($results[0]))
and also in ShowMap.inc on line 87:
change If (!empty($results))
for If (!empty($results[0]))
That should fixe it, I have this resolved and will keep the change the next upload (soon)
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 22:37
Termitenshort wrote:
Ok I got it solved this time for real
In MapSiteAdmin.inc on line 743:
change
If (!empty($results))
for
If (!empty($results[0]))
and also in ShowMap.inc on line 87:
change
If (!empty($results))
for
If (!empty($results[0]))
That should fixe it, I have this resolved and will keep the change the next upload (soon)
In fact this only fixes the problem in certain situation ... so I made a bigger change and I'm gonna upload it soon....
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 22:43
Here is version 0.4.0b which does not add any feature but fixes the problem when there is no coordinate attached to any album or photos.
Enjoy !
-------------------------
The Termite
galmoid
Joined: 2005-11-07
Posts: 364
Posted: Mon, 2005-11-07 23:06
Quote:
The module should gather the value of the path directly from the Imagemagick module, if this one isn;t found there would be no path specified and so the "%PATH%" variable would be use to locate the binary...
I did not understand why this was necessary; but, it was. The correct path -is- set in 'Graphics Toolkits' and I've not seen any other complaints (from my system) about this.
Quote:
I think I need to add some sort of a guide on how to setup the map.
Yes, Please . . . For Dummies.
Quote:
That is because you have no GPS coordinate set in any album yet...
Coordinates are necessary at the album level? I did set coordinates for a photo within an ablum; but, not for the album itself.
igrcic
Joined: 2005-04-19
Posts: 78
Posted: Mon, 2005-11-07 23:06
Hi Termite!
Just tried your 0.4.0b version...update my g2_mapmap table, deleted cache.....i see that you've changed menu item from Google map to Google map settings, but when i click on it all that I get is empty page, no admin content for google map
Map is working ok...only there is no admin pages!
hmmm.....something fishy any ideas termite
galmoid
Joined: 2005-11-07
Posts: 364
Posted: Mon, 2005-11-07 23:09
Quote:
In fact this only fixes the problem in certain situation ... so I made a bigger change and I'm gonna upload it soon....
I tried this -and- the newly uploaded 0.4.0b and I no longer get the error; but, I get a blank admin section.
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 23:33
Fishy I think that is .... in fact I tried deleting the template cache, database cache and all my GPS coordinate that I had entered and I canno t recreate the problem
Maybe if you temporarely give me access to your site I might figure out what's wrong with your admin page ?
That doesn't sound right. I even try on another machine and it seems to be fine ....
-------------------------
The Termite
igrcic
Joined: 2005-04-19
Posts: 78
Posted: Mon, 2005-11-07 23:45
...i PM-ed you
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2005-11-07 23:49
igrcic wrote:
...i PM-ed you
Thx .. hmm where is your website again
galmoid
Joined: 2005-11-07
Posts: 364
Posted: Tue, 2005-11-08 00:08
Here is the problem with the balnk admin page (at least with me).
mapSiteAdmin.tpl is actually named MapSiteAdmin.tpl
* in modules/core/classes/GallerySmarty.class at line 108 (gallerystatus::error)
* in lib/smarty/Smarty.class.php at line 1584 (gallerysmarty::trigger_error)
* in lib/smarty/Smarty.class.php at line 1410 (gallerysmarty::_fetch_resource_info)
* in lib/smarty/Smarty.class.php at line 1859 (gallerysmarty::_compile_resource)
* in /opt/csw/apache/gallery2data/smarty/templates_c/%%3122720344/%%CD^CD7^CD714190%%SiteAdmin.tpl.php at line 63 (gallerysmarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1861
* in /opt/csw/apache/gallery2data/smarty/templates_c/%%3122720344/%%54^54D^54D7A448%%admin.tpl.php at line 4 (gallerysmarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1861
* in modules/core/classes/GalleryTemplateAdapter.class at line 638 (gallerysmarty::_smarty_include)
* in /opt/csw/apache/gallery2data/smarty/templates_c/%%3122720344/%%3A^3A8^3A818B59%%theme.tpl.php at line 53 (gallerytemplateadapter::theme)
* in lib/smarty/Smarty.class.php at line 1251
* in modules/core/classes/GallerySmarty.class at line 90 (smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 228 (gallerysmarty::fetch)
* in main.php at line 318 (gallerytemplate::display)
* in main.php at line 87
* in main.php at line 80
-----
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-11-08 00:14
Well I have the problem it's a tyo that I made the only reason it works at my place is because I'm running it on 2 windows boxes ... I hadn't tested linux just yet
I guess I suck Like usual ... Anyways, to fix the problem, just edit the MapSiteAdmin.inc
At the very end of the file you will see a line like:
I can see your map but only the marker_shadow.png are displayed.
Are you sure your paths "/images/map/Conor/marker_ORANGE.png" and "/images/map/Conor/marker_default.png" are correct and the png files actually exist?
Quote:
For some reason, they didn't get created from the admin pages, but I've created them manually, and now everything is sweet.
That's a really nice module. Well done!
I will check out version 0.4 and see what happens.
The wiki links to this thread. Seems like there should be a seperate thread for each?
One is a theme and the other is a module.
The theme is very close in functionality to the module but it album based. The theme has not been updated for some time.
There should be a separate thread for each but there is nobody to step up to the plate and work on the theme.
I suspect that once the module is very close to complete the theme will get worked on.
Volunteers?
Dave
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-11-08 04:25
Also at some point the theme would not be usefull if the module has the capability to restrain the number of marker based on a criteria (like a group or something)
In the mean time when I'm done with the route feature I might take a look at the theme to see if it's a big deal to bring it up to speed.
See you !
-------------------------
The Termite
igrcic
Joined: 2005-04-19
Posts: 78
Posted: Tue, 2005-11-08 09:50
Yup! grouping would be awesome! and ability to have more maps, something like map theme, so that every user can create its own maps! think there should be some permissions involved so that only user that owns the map can add GPS coordinates to it, or something like that.
Personally I think that multi-map and grouping is more important than route, hope you'll work on that soon ...although route is also a very cool feature indeed
think im gonna adopt it to me so i can use lat, long format
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-11-08 13:17
igrcic wrote:
Yup! grouping would be awesome! and ability to have more maps, something like map theme, so that every user can create its own maps! think there should be some permissions involved so that only user that owns the map can add GPS coordinates to it, or something like that.
Personally I think that multi-map and grouping is more important than route, hope you'll work on that soon ...although route is also a very cool feature indeed
think im gonna adopt it to me so i can use lat, long format
Well ... that's heritage I did not change that in the module it has been that way from the beginning when steven has created it
It can be change pretty easily but If i do it in the module it's gonna mess up everyone using it at the moment and you would need to change all the gps coordinates of all pictures/albums.
Does everyone think we should change it or keep it the way it is ?
intrinsic
Joined: 2005-09-24
Posts: 2
Posted: Tue, 2005-11-08 14:04
Let the user "admin" decide which way they like to have the order of those two fields.
make it configurable.
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-11-08 14:08
intrinsic wrote:
Let the user "admin" decide which way they like to have the order of those two fields.
make it configurable.
That's a good idea but seems a little more tricky
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-11-08 15:22
VICTORY !!
I've got the route deal to work here are some screenshot of what it looks like. I have 4 things I want to change and then I upload it:
- More error control (there is none at this point )
- Add the possibility to disable a route
- Do the "Edit" feature
- Make it more friendly (color picker for example)
For the time being, enjoy the screenshot and if you feel adventurous, you can get it from CVS :D
-------------------------
The Termite
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-11-08 15:27
Sorry I got out of hand but I was happy
-------------------------
The Termite
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-11-08 15:29
you guys are moving fast
too much to read. if you have any G2 specific question, let us know.
djrm2
Joined: 2005-10-04
Posts: 54
Posted: Tue, 2005-11-08 16:03
The GPS module http://codex.gallery2.org/index.php/Gallery2:Modules:Gps has just become a perfect partner for use with the GooleMap module, it can now import a GPS track - I use Ozi Explorer track logs - and add to the GoogleMap GPS field the locations of photos it finds on the track. These phots will then appear in the Gallery map view as well as in the Google Map exported file. To use these features it is neccessary to use the latest versions of both modules.
Nice work all concerned. Dave.
samkuhn2
Joined: 2004-04-13
Posts: 60
Posted: Tue, 2005-11-08 16:57
Termite-
Are you stilling planning on allowing autofilling of the GPS info from exif tags? Now that the GPS coords are stored in a table, it should be relatively straightforward, right?
I have attached a small jpg that I tagged with GPS data using the software at http://www.wwmx.org . Jhead spits out "GPS Latitude" and "GPS Longitude" fields when tested.
Allowing users to tag files offline would allow greater automation of tagging and facilitate use of cameras that already incorporate GPS directly in the camera (rare/expensive though those cameras are).
Are you stilling planning on allowing autofilling of the GPS info from exif tags? Now that the GPS coords are stored in a table, it should be relatively straightforward, right?
I have attached a small jpg that I tagged with GPS data using the software at http://www.wwmx.org . Jhead spits out "GPS Latitude" and "GPS Longitude" fields when tested.
Allowing users to tag files offline would allow greater automation of tagging and facilitate use of cameras that already incorporate GPS directly in the camera (rare/expensive though those cameras are).
Thanks for all your work so far.
Yes I am and yes you are correct
I made the module independant of CustomField so that it's a lot easier to add features like this one.
thx for your jpeg I had not made one (and I wasn't sure how) but that's next on the list right after the route deal is finish (sometime this week).
I'm going to propose 2 ways to automate:
- Directly from the photo and
- From the admin page where you just click a button and it browse all pic and put GPS coord in the pics (but that's only a step 2) :D
See you
----------------------
The Termite
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Tue, 2005-11-08 17:32
djrm2 wrote:
The GPS module http://codex.gallery2.org/index.php/Gallery2:Modules:Gps has just become a perfect partner for use with the GooleMap module, it can now import a GPS track - I use Ozi Explorer track logs - and add to the GoogleMap GPS field the locations of photos it finds on the track. These phots will then appear in the Gallery map view as well as in the Google Map exported file. To use these features it is neccessary to use the latest versions of both modules.
Nice work all concerned. Dave.
This is indeed the coolest thing ever !! I love it. I just wish I had a GPSr device coz that would have been something I would use this december :D
floridave
Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2005-11-08 18:29
valiant wrote:
you guys are moving fast
too much to read. if you have any G2 specific question, let us know.
I guess a code review would be in order.
On another note;
I’m thinking of adding "labels" to the map. They would be .png images and shadows (if needed) to label specific buildings or points on interest. I started to do this but after looking at the tracking that termite has done, I have to rethink my implementation. (it looks great termite!) I will look at the track code and test to see if my labels would be useful.
Dave
jelwell
Joined: 2003-05-29
Posts: 115
Posted: Wed, 2005-11-09 00:09
I made some modifications to this module for my own purposes. I'll post diffs later.
1) Added ability to filter by album. This is a great feature for those of us with User Albums, now you can filter out only your own gps data easily.
2) Modified GPSMap.tpl so that, when adding a coordinate, you can search rather than point and click. Search by address, city & state, zip code, or International City and state. Although this hack uses a public geocoder and I'm currently waiting to for permission to distribute changes that enable use of the geocoding server.
joey.
P.S. This reply feature freezes Safari if I hit the space bar (to scroll the page down) when not editing in a text field. This is the third time I've tried to reply.
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 01:08
Hello,
I've started a wiki on the gallery codex so we can have user's guide and such ... I'll be completing it this friday or maybe before If I get some time.
Are you stilling planning on allowing autofilling of the GPS info from exif tags? Now that the GPS coords are stored in a table, it should be relatively straightforward, right?
I have attached a small jpg that I tagged with GPS data using the software at http://www.wwmx.org . Jhead spits out "GPS Latitude" and "GPS Longitude" fields when tested.
Allowing users to tag files offline would allow greater automation of tagging and facilitate use of cameras that already incorporate GPS directly in the camera (rare/expensive though those cameras are).
Sam,
Are you sure this image has GPS data? I tried viewing it using jhead and also PSPro (see attached screenshot) and I don't see any such GPS data.
igrcic
Joined: 2005-04-19
Posts: 78
Posted: Wed, 2005-11-09 02:16
...i guess it does
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 02:26
I have the coordinate as well (i use IExif on windoz)
-------------------------
The Termite
swordfish
Joined: 2004-10-01
Posts: 388
Posted: Wed, 2005-11-09 02:34
igrcic wrote:
...i guess it does
Not sure whats up with PSPro but I see the GPS data now. I had to update jhead on my linux box.
kwick60073
Joined: 2005-11-09
Posts: 8
Posted: Wed, 2005-11-09 14:51
First, many thanks for the effort of integrating Google Maps with Gallery and all of the support.
It appears that from a stability standpoint, the map module is more stable than the theme. Should both be installed, or will it suffice to just install the module? Does having the theme effect the module? In other words, if it is installed, should I remove it?
I continue to get that my API key is invalid (Firefox, Opera and IE). Is this typical? Some posts suggest yes, but others seem like it is solved. Just trying to determine if I continue to resolve the issue.
Thanks,
kwick
valiant
Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-11-09 15:15
you only need the map module. i don't think the theme affects the module. but it doesn't make much sense to use both i guess.
what's your g2 version and what is the exact message you're getting?
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 15:28
valiant wrote:
you only need the map module. i don't think the theme affects the module. but it doesn't make much sense to use both i guess.
what's your g2 version and what is the exact message you're getting?
I Have seen this error and it only happens with the theme. I have not been able to fix the problem but I know that someone else did already. if you look into the begining of this post you will see the solution somewhere :D
kwick60073
Joined: 2005-11-09
Posts: 8
Posted: Wed, 2005-11-09 15:36
I am just using the module now with Gallery 2.0.1.
I don't see any links to a map. Below is the change I made to photo.tpl. I see the message "Hi Kenny", but not "kdw: in if for MAP." If I remove the "if", then I see my message with a link to a map. I can even see the pins I have identified (no error message about invalid key). The same thing is occurring on the album page.
In the Edit Album > Theme page, I have added Google Map to Sidebar, Album Page and Photo Page.
Apparently, I missing some setting. I just have determined which one yet.
{if !empty($theme.item.description)}
<p class="giDescription">
{$theme.item.description|markup}
</p>
{/if}
<p>Hi Kenny</p>
{if isset($smarty.get.g2_FromMap)}
<p>kdw: in if for MAP</p>
<a href="{g->url arg1="view=map.ShowMap"}">Go Back to the Map</a>
{/if}
Thanks,
kwick
Termitenshort
Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2005-11-09 16:23
floridave wrote:
Add "Get via a Map" link on the admin page next to the 'Center On:' input box
Done
-------------------------
The Termite
jelwell
Joined: 2003-05-29
Posts: 115
Posted: Wed, 2005-11-09 17:24
Geocoding. I received permission to distribute the code. However EVERYONE needs to get in touch with mike if you make use of it. I suggest that geocoding be incorporated into the module as a *default off* preference and that the preference CLEARLY state that you need to contact Mike (if using the brainoff server) or instructions on using geocoder.us (which I believe requires an account - and only supports United States geocoding). It should be pointed out that both servers only allow free geocoding for NON-COMMERCIAL purposes.
ShowMap.inc
This is my attempt to filter based on a passed in album id. Something like:
/gallery/main.php?g2_view=map.ShowMap&g2_itemId=36187 should only show items who are children (however distant) of 36187
GPSMap.tpl
A lot of javascript to parse the geocoding response. I haven't bothered to clean this, or pretty much anything, up. You'll note, in particular that the url needs to be changed. It currently points to a bogus example.com. It should point to a file created into the module that simply redirects to brainoff.
I found out *after* I was done, in the process of asking permission, that someone else created a similar proxy already: http://brainoff.com/gmaps/mgeocoder.html (I'm not a fan of their "Geocode" button that magically makes the entry data fields appear. My mom doesn't know what "Geocode" means. It's fun javascript, but confusing UI.)
But this one might not require php.ini changes (although I imagine there are some hideous security issues with simply passing in any content to curl), and supports two geocoders : http://brainoff.com/gmaps/proxy.txt
You'll need to modify the url in GPSMap.tpl to send your preferred geocoder domain. such as:
Geocoding. I received permission to distribute the code. However EVERYONE needs to get in touch with mike if you make use of it. I suggest that geocoding be incorporated into the module as a *default off* preference and that the preference CLEARLY state that you need to contact Mike (if using the brainoff server) or instructions on using geocoder.us (which I believe requires an account - and only supports United States geocoding). It should be pointed out that both servers only allow free geocoding for NON-COMMERCIAL purposes.
I don't know if that's a great idea ... the final goal is to get the module as part of the default installation of Galllery2 (or 3) and I'm not feeling very confortable with this idea.
Can we look at other alternative (if there is any ?) ?
---------------------
The Termite
jelwell
Joined: 2003-05-29
Posts: 115
Posted: Wed, 2005-11-09 20:17
Termitenshort wrote:
Can we look at other alternative (if there is any ?) ?
---------------------
The Termite
Good luck finding an alternative free service. My guess is you'll have to wait for the Maps API wars to pick up a bit more. Mapquest, Yahoo and Google ought to be handing out more and more free features.
Not to deter you, but did you realize that even Google's Terms of Service require that you be "relatively NON-COMMERCIAL":
"1.4 Appropriate Conduct and Prohibited Uses. The Service may be used only for services that are generally accessible to consumers without charge."
Yahoo's terms of use: "The Yahoo! AJAX Maps API is limited to 50,000 queries per IP per day and to non-commercial use. "
SooooOooOo, I mean, if you're worried about integrating geocoding - because of it's non-commercial clause - then you should be worried about integrating Google maps or Yahoo Maps as well.
The dot com days are, mostly, over. They're not giving this stuff away for free anymore. You need PAID license to partner and user these Map APIs for commercial purposes.
Joseph Elwell.
jcampbell1
Joined: 2005-10-26
Posts: 8
Posted: Wed, 2005-11-09 20:17
It looks like the geocoder in jelwell's posts is implemented in javascript. This seems like like a painful and potentially buggy solution to the problem. Wouldn't be much easier to just implement a geocoder in php since we only have to lookup the coordinates once.
Also, is it just me or are the brianoff.com folks reinventing Google Maps?
samkuhn2
Joined: 2004-04-13
Posts: 60
Posted: Wed, 2005-11-09 20:18
Quote:
Can we look at other alternative (if there is any ?) ?
You can download the code and the latest TIGER/Line data, and build your own Geo::Coder::US service or application for whatever purpose you like.
The data file is not tiny from that site though (unless I'm misunderstanding what they are saying). It appears that the total data set would be on the order of 1GB perhaps.
Also, as the URL suggests, that is only the United States data set. Worldwide would be well, even bigger.
Posts: 364
Thank You, all, for this module.
I can, at times, be very dense -and- ask lame questions. Please be patient with me.
- I find that the call to use the 'convert' command in MapSiteAdmin.inc resulted in
the command not being found. I had to provide a path to it.
- I have been trying to get map-module-0.3.2b working.
I installed, activated and configured it. I configured the information in 'Custom Fields'
for a single photo. The only way I am able to get to a map is to place the 'Go Back to the Map'
href outside og the 'if' in photo.tpl. When I go to the photo I see the link and clicking on it
produces the map.
- I tried dowloading the latest (map-module-0.4.0.zip) to try it. I deactivated and uninstalled 0.3.2,
deleted template cache, mv'd the old map out of modules and put the new map in. I installed and
activated the new map module; but, upon trying to go to 'Google Map Settings' I am met with:
Warning: assert(): Assertion "!empty($ids)" failed in /opt/csw/apache/htdocs/gallery/modules/core/classes/GalleryStorage/DatabaseStorage.class on line 2059
Any pointers/help/??? is appreciated.
Posts: 1894
This was already in the module for a while now .... ?
Posts: 1894
It will be nice to implement that, if you send me the code I can add an entry in the AdminPanel so that we can choose to use AutoCenter or not
Posts: 1894
The module should gather the value of the path directly from the Imagemagick module, if this one isn;t found there would be no path specified and so the "%PATH%" variable would be use to locate the binary...
I'm not sure why you need to specify the path manually, I'd like to fix this bug if posssible
I think I need to add some sort of a guide on how to setup the map.
This is normal behaviour, the map only shows up when you go to a certain URL (http://yourdmain/youpathtofallery/main.php?view=map.Showmap)
That is because you have no GPS coordinate set in any album yet, I tried to explain it in the posting but I guess it wasn't clear enought
Also, I thought I had fixed it ... guess not ...
I'll be looking at that in more details
Thanks for the input !
--------------------------
The Termite
Posts: 1894
Ok I got it solved this time for real
In MapSiteAdmin.inc on line 743:
change
If (!empty($results))
for
If (!empty($results[0]))
and also in ShowMap.inc on line 87:
change
If (!empty($results))
for
If (!empty($results[0]))
That should fixe it, I have this resolved and will keep the change the next upload (soon)
Posts: 1894
In fact this only fixes the problem in certain situation ... so I made a bigger change and I'm gonna upload it soon....
Posts: 1894
Here is version 0.4.0b which does not add any feature but fixes the problem when there is no coordinate attached to any album or photos.
Enjoy !
-------------------------
The Termite
Posts: 364
I did not understand why this was necessary; but, it was. The correct path -is- set in 'Graphics Toolkits' and I've not seen any other complaints (from my system) about this.
Yes, Please . . . For Dummies.
Coordinates are necessary at the album level? I did set coordinates for a photo within an ablum; but, not for the album itself.
Posts: 78
Hi Termite!
Just tried your 0.4.0b version...update my g2_mapmap table, deleted cache.....i see that you've changed menu item from Google map to Google map settings, but when i click on it all that I get is empty page, no admin content for google map
Map is working ok...only there is no admin pages!
hmmm.....something fishy any ideas termite
Posts: 364
I tried this -and- the newly uploaded 0.4.0b and I no longer get the error; but, I get a blank admin section.
Posts: 1894
Fishy I think that is .... in fact I tried deleting the template cache, database cache and all my GPS coordinate that I had entered and I canno t recreate the problem
Maybe if you temporarely give me access to your site I might figure out what's wrong with your admin page ?
That doesn't sound right. I even try on another machine and it seems to be fine ....
-------------------------
The Termite
Posts: 78
...i PM-ed you
Posts: 1894
Thx .. hmm where is your website again
Posts: 364
Here is the problem with the balnk admin page (at least with me).
mapSiteAdmin.tpl is actually named MapSiteAdmin.tpl
----
Error Detail -
Error (ERROR_BAD_PARAMETER) : Smarty error: unable to read resource: "gallery:modules/map/templates/mapSiteAdmin.tpl"
* in modules/core/classes/GallerySmarty.class at line 108 (gallerystatus::error)
* in lib/smarty/Smarty.class.php at line 1584 (gallerysmarty::trigger_error)
* in lib/smarty/Smarty.class.php at line 1410 (gallerysmarty::_fetch_resource_info)
* in lib/smarty/Smarty.class.php at line 1859 (gallerysmarty::_compile_resource)
* in /opt/csw/apache/gallery2data/smarty/templates_c/%%3122720344/%%CD^CD7^CD714190%%SiteAdmin.tpl.php at line 63 (gallerysmarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1861
* in /opt/csw/apache/gallery2data/smarty/templates_c/%%3122720344/%%54^54D^54D7A448%%admin.tpl.php at line 4 (gallerysmarty::_smarty_include)
* in lib/smarty/Smarty.class.php at line 1861
* in modules/core/classes/GalleryTemplateAdapter.class at line 638 (gallerysmarty::_smarty_include)
* in /opt/csw/apache/gallery2data/smarty/templates_c/%%3122720344/%%3A^3A8^3A818B59%%theme.tpl.php at line 53 (gallerytemplateadapter::theme)
* in lib/smarty/Smarty.class.php at line 1251
* in modules/core/classes/GallerySmarty.class at line 90 (smarty::fetch)
* in modules/core/classes/GalleryTemplate.class at line 228 (gallerysmarty::fetch)
* in main.php at line 318 (gallerytemplate::display)
* in main.php at line 87
* in main.php at line 80
-----
Posts: 1894
Well I have the problem it's a tyo that I made the only reason it works at my place is because I'm running it on 2 windows boxes ... I hadn't tested linux just yet
I guess I suck Like usual ... Anyways, to fix the problem, just edit the MapSiteAdmin.inc
At the very end of the file you will see a line like:
And it should really be:
array('body' => 'modules/map/templates/MapSiteAdmin.tpl'));
I Apologize for that stupid mistake
EDIT: Of course I've updated the CVS repository and here is the "zip" version
-------------------------
The Termite
Posts: 32509
also see the new GPS module: http://gallery.menalto.com/node/39661
Posts: 166
Posts: 43
what is the difference between http://gallery.menalto.com/files/map%20theme%201.0.2.zip
and the 0.4.0b code here?
The wiki links to this thread. Seems like there should be a seperate thread for each?
Posts: 27300
One is a theme and the other is a module.
The theme is very close in functionality to the module but it album based. The theme has not been updated for some time.
There should be a separate thread for each but there is nobody to step up to the plate and work on the theme.
I suspect that once the module is very close to complete the theme will get worked on.
Volunteers?
Dave
Posts: 1894
Also at some point the theme would not be usefull if the module has the capability to restrain the number of marker based on a criteria (like a group or something)
In the mean time when I'm done with the route feature I might take a look at the theme to see if it's a big deal to bring it up to speed.
See you !
-------------------------
The Termite
Posts: 78
Yup! grouping would be awesome! and ability to have more maps, something like map theme, so that every user can create its own maps! think there should be some permissions involved so that only user that owns the map can add GPS coordinates to it, or something like that.
Personally I think that multi-map and grouping is more important than route, hope you'll work on that soon ...although route is also a very cool feature indeed
oh yeah.....can you remind me why r we using Longitude,Latitude format when every GPS is a think by the default using Latitude,Longitude format, which is btw used everywhere? even coordinates on GoogleMap are in Latitude,Longitude format.
http://local.google.com/maps?ll=45.690833,16.281738&spn=6.153391,14.236084&t=h&hl=en
...also lots of places where u can get coordinates offer (like those 2) use that format
http://www.robogeo.com/latlonfinder/map.asp
http://www.heavens-above.com/countries.asp
oooh, i just take a look at google's map api...i guess we're using that format because google constructor for points is in that format
http://www.google.com/apis/maps/documentation/#GPoint_code_
think im gonna adopt it to me so i can use lat, long format
Posts: 1894
Well ... that's heritage I did not change that in the module it has been that way from the beginning when steven has created it
It can be change pretty easily but If i do it in the module it's gonna mess up everyone using it at the moment and you would need to change all the gps coordinates of all pictures/albums.
Does everyone think we should change it or keep it the way it is ?
Posts: 2
Let the user "admin" decide which way they like to have the order of those two fields.
make it configurable.
Posts: 1894
That's a good idea but seems a little more tricky
Posts: 1894
VICTORY !!
I've got the route deal to work here are some screenshot of what it looks like. I have 4 things I want to change and then I upload it:
- More error control (there is none at this point )
- Add the possibility to disable a route
- Do the "Edit" feature
- Make it more friendly (color picker for example)
For the time being, enjoy the screenshot and if you feel adventurous, you can get it from CVS :D
-------------------------
The Termite
Posts: 1894
Sorry I got out of hand but I was happy
-------------------------
The Termite
Posts: 32509
you guys are moving fast
too much to read. if you have any G2 specific question, let us know.
Posts: 54
The GPS module http://codex.gallery2.org/index.php/Gallery2:Modules:Gps has just become a perfect partner for use with the GooleMap module, it can now import a GPS track - I use Ozi Explorer track logs - and add to the GoogleMap GPS field the locations of photos it finds on the track. These phots will then appear in the Gallery map view as well as in the Google Map exported file. To use these features it is neccessary to use the latest versions of both modules.
Nice work all concerned. Dave.
Posts: 60
Termite-
Are you stilling planning on allowing autofilling of the GPS info from exif tags? Now that the GPS coords are stored in a table, it should be relatively straightforward, right?
I have attached a small jpg that I tagged with GPS data using the software at http://www.wwmx.org . Jhead spits out "GPS Latitude" and "GPS Longitude" fields when tested.
Allowing users to tag files offline would allow greater automation of tagging and facilitate use of cameras that already incorporate GPS directly in the camera (rare/expensive though those cameras are).
Thanks for all your work so far.
http://people.vanderbilt.edu/~sam.kuhn/creamers.jpg
Posts: 1894
Yes I am and yes you are correct
I made the module independant of CustomField so that it's a lot easier to add features like this one.
thx for your jpeg I had not made one (and I wasn't sure how) but that's next on the list right after the route deal is finish (sometime this week).
I'm going to propose 2 ways to automate:
- Directly from the photo and
- From the admin page where you just click a button and it browse all pic and put GPS coord in the pics (but that's only a step 2) :D
See you
----------------------
The Termite
Posts: 1894
This is indeed the coolest thing ever !! I love it. I just wish I had a GPSr device coz that would have been something I would use this december :D
Posts: 27300
I guess a code review would be in order.
On another note;
I’m thinking of adding "labels" to the map. They would be .png images and shadows (if needed) to label specific buildings or points on interest. I started to do this but after looking at the tracking that termite has done, I have to rethink my implementation. (it looks great termite!) I will look at the track code and test to see if my labels would be useful.
Dave
Posts: 115
I made some modifications to this module for my own purposes. I'll post diffs later.
1) Added ability to filter by album. This is a great feature for those of us with User Albums, now you can filter out only your own gps data easily.
2) Modified GPSMap.tpl so that, when adding a coordinate, you can search rather than point and click. Search by address, city & state, zip code, or International City and state. Although this hack uses a public geocoder and I'm currently waiting to for permission to distribute changes that enable use of the geocoding server.
joey.
P.S. This reply feature freezes Safari if I hit the space bar (to scroll the page down) when not editing in a text field. This is the third time I've tried to reply.
Posts: 1894
Hello,
I've started a wiki on the gallery codex so we can have user's guide and such ... I'll be completing it this friday or maybe before If I get some time.
In the mean time if you want to refer to it:
Map Module Wiki Doc
-------------------------
The Termite
Posts: 388
Sam,
Are you sure this image has GPS data? I tried viewing it using jhead and also PSPro (see attached screenshot) and I don't see any such GPS data.
Posts: 78
...i guess it does
Posts: 1894
I have the coordinate as well (i use IExif on windoz)
-------------------------
The Termite
Posts: 388
Not sure whats up with PSPro but I see the GPS data now. I had to update jhead on my linux box.
Posts: 8
First, many thanks for the effort of integrating Google Maps with Gallery and all of the support.
It appears that from a stability standpoint, the map module is more stable than the theme. Should both be installed, or will it suffice to just install the module? Does having the theme effect the module? In other words, if it is installed, should I remove it?
I continue to get that my API key is invalid (Firefox, Opera and IE). Is this typical? Some posts suggest yes, but others seem like it is solved. Just trying to determine if I continue to resolve the issue.
Thanks,
kwick
Posts: 32509
you only need the map module. i don't think the theme affects the module. but it doesn't make much sense to use both i guess.
what's your g2 version and what is the exact message you're getting?
Posts: 1894
I Have seen this error and it only happens with the theme. I have not been able to fix the problem but I know that someone else did already. if you look into the begining of this post you will see the solution somewhere :D
Posts: 8
I am just using the module now with Gallery 2.0.1.
I don't see any links to a map. Below is the change I made to photo.tpl. I see the message "Hi Kenny", but not "kdw: in if for MAP." If I remove the "if", then I see my message with a link to a map. I can even see the pins I have identified (no error message about invalid key). The same thing is occurring on the album page.
In the Edit Album > Theme page, I have added Google Map to Sidebar, Album Page and Photo Page.
Apparently, I missing some setting. I just have determined which one yet.
{if !empty($theme.item.description)}
<p class="giDescription">
{$theme.item.description|markup}
</p>
{/if}
<p>Hi Kenny</p>
{if isset($smarty.get.g2_FromMap)}
<p>kdw: in if for MAP</p>
<a href="{g->url arg1="view=map.ShowMap"}">Go Back to the Map</a>
{/if}
Thanks,
kwick
Posts: 1894
Done
-------------------------
The Termite
Posts: 115
Geocoding. I received permission to distribute the code. However EVERYONE needs to get in touch with mike if you make use of it. I suggest that geocoding be incorporated into the module as a *default off* preference and that the preference CLEARLY state that you need to contact Mike (if using the brainoff server) or instructions on using geocoder.us (which I believe requires an account - and only supports United States geocoding). It should be pointed out that both servers only allow free geocoding for NON-COMMERCIAL purposes.
ShowMap.inc
This is my attempt to filter based on a passed in album id. Something like:
/gallery/main.php?g2_view=map.ShowMap&g2_itemId=36187 should only show items who are children (however distant) of 36187
GPSMap.tpl
A lot of javascript to parse the geocoding response. I haven't bothered to clean this, or pretty much anything, up. You'll note, in particular that the url needs to be changed. It currently points to a bogus example.com. It should point to a file created into the module that simply redirects to brainoff.
I found out *after* I was done, in the process of asking permission, that someone else created a similar proxy already:
http://brainoff.com/gmaps/mgeocoder.html (I'm not a fan of their "Geocode" button that magically makes the entry data fields appear. My mom doesn't know what "Geocode" means. It's fun javascript, but confusing UI.)
proxy.php
Mine looks like this:
But this one might not require php.ini changes (although I imagine there are some hideous security issues with simply passing in any content to curl), and supports two geocoders :
http://brainoff.com/gmaps/proxy.txt
You'll need to modify the url in GPSMap.tpl to send your preferred geocoder domain. such as:
Joseph Elwell
Posts: 60
Another useful link is the Open Source page on the brainoff site:
http://brainoff.com/worldkit/opensource.php
Posts: 1894
I don't know if that's a great idea ... the final goal is to get the module as part of the default installation of Galllery2 (or 3) and I'm not feeling very confortable with this idea.
Can we look at other alternative (if there is any ?) ?
---------------------
The Termite
Posts: 115
Good luck finding an alternative free service. My guess is you'll have to wait for the Maps API wars to pick up a bit more. Mapquest, Yahoo and Google ought to be handing out more and more free features.
Not to deter you, but did you realize that even Google's Terms of Service require that you be "relatively NON-COMMERCIAL":
"1.4 Appropriate Conduct and Prohibited Uses. The Service may be used only for services that are generally accessible to consumers without charge."
Yahoo's terms of use: "The Yahoo! AJAX Maps API is limited to 50,000 queries per IP per day and to non-commercial use. "
SooooOooOo, I mean, if you're worried about integrating geocoding - because of it's non-commercial clause - then you should be worried about integrating Google maps or Yahoo Maps as well.
The dot com days are, mostly, over. They're not giving this stuff away for free anymore. You need PAID license to partner and user these Map APIs for commercial purposes.
Joseph Elwell.
Posts: 8
It looks like the geocoder in jelwell's posts is implemented in javascript. This seems like like a painful and potentially buggy solution to the problem. Wouldn't be much easier to just implement a geocoder in php since we only have to lookup the coordinates once.
Also, is it just me or are the brianoff.com folks reinventing Google Maps?
Posts: 60
http://geocoder.us/
From the lower right of that page:
The data file is not tiny from that site though (unless I'm misunderstanding what they are saying). It appears that the total data set would be on the order of 1GB perhaps.
Also, as the URL suggests, that is only the United States data set. Worldwide would be well, even bigger.
[edit]
Better link here:
http://dan.egnor.name/google.html
Posts: 8
http://www.geocoder.us is free for non-commercial. No other stipulations, and see this page for how to get the data in php. http://www.atlphp.org/node/70