[Maps Module] Multiple photos with same gps not showing

brago

Joined: 2006-07-24
Posts: 20
Posted: Wed, 2007-08-15 10:46

Hey guys,
First a big thanks to the guys developing the google maps module! The first initial tests I have done this morning seems very promissing!

As the subject tells, I have a question regarding multiple photos with same GPS position. Currently my map view only displays one image of the ones that have the exact same gps position. Is there a way around this? I did try to look through the settings but did not find any options that I thought had to do with that.

I'm running Gallery 2.2
Installed maps module fron SVN this morning = I think revision 271, Plug in options indicate version 0.5.2a
PGTheme
Ubuntu 7.04 server version

Any more information needed?

Thanks for help!

BR
Stefan

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Wed, 2007-08-15 20:06

It probably actually has all of them there, you just can't see them because they're stacked up on top of each other. You could try turning on the thumbnail bar; that would give you an alternate method of opening the info window for the respective photos.

A future feature that I have planned is to make the marker clustering work more like how Google Earth works, where the markers explode out when you click on the cluster, with leaders back to their original position.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25941
Posted: Thu, 2007-08-16 00:22

SiliconFiend, would it be possible to rotate the pushpin if there is items with the same coordinates?
Just a idea.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Thu, 2007-08-16 01:37

That would be somewhat difficult, would slow the server and probably would not help very much, because depending how many items have the same coordinates, it wouldn't give you much more clickable area. Custom icon rotations are another feature I'm planning for the Mini Map block to show the direction the photo was taken.

 
brago

Joined: 2006-07-24
Posts: 20
Posted: Thu, 2007-08-16 09:32

Thanks for the quick reply!
The idea of expanding the pins would be great!

Do you mind pointing me in the direction of where in the code the image pop up window is located, where the positioning of the pins on the map are and what actually happens when you click on a pin? I have not done development for a couple of years... but perhaps I can try and see if I can wake the abilities up again ;-)

Thanks again,
Stefan

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Thu, 2007-08-16 13:49

The map/templates/infowindow folder has the code for the contents of the infowindow (the various .inc files are the different infowindow theme options you can select; only one at a time is active). The CreateMarker javascript function in map/templates/MapHeader.tpl is where the marker addition actually happens.

 
brago

Joined: 2006-07-24
Posts: 20
Posted: Thu, 2007-08-16 20:40

Great thanks, I will have a look!

/Stefan

 
brago

Joined: 2006-07-24
Posts: 20
Posted: Fri, 2007-08-17 08:49

Hi again,
First, do you mind if we use this thread for further discussing how the module works so I can try and see if I can do a modification? If there is a better and more suitable way, please let me know. Also, if you do not have the time to keep answering me back on how the module is implemented and rather do it as you want when you have time, please let me know, I will not be offended.

I’ve started to have a look at the code and find my way around. However, the small cells in the brain that are used for SW coding needs to be waken up gently ;-)

First I realized to get things working I needed a way to see if there are other photos nearby, which I understand you already have implemented in the grouping feature. Could you give me a point to what function actually does that, I mean group the markers and where you check adjacent photos? The reason is that I thought the easiest way of accomplishing what I wanted is to alter the Info window open up feature so that you verify if there are adjacent photos and display them together in a multiple info window. Or display several info windows side by side.

As a side note, I wanted the info window to show when you mouse over a pin on the map. That was not to hard to alter in the CreateMarker function. However, can you give me a hint on a function to close the info window, to run when mouseout?

Again, thanks!
Stefan

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Fri, 2007-08-17 14:20

No, I don't mind using this thread, as long as it's all related to the subject (clustering of markers).

I don't really like the way the clustering (regroup) works currently. It's all pre-processed in PHP; I'd rather get all the markers into the web page and then cluster them using javascript. The algorithm I was thinking of using to determine the distance from other markers is a modification of the distance algorithm (i.e., sqrt(dx^2 + dy^2) ). Since we don't need the actual distance, you could eliminate the sqrt call to speed it up. Instead, if you're looking for markers that are, say, less than 10 pixels apart, then you would square that distance (i.e., 10^2 = 100) and then compare that result to the distance between the two markers: (x1 - x2)^2 + (y1 - y2)^2 Of course, you'll need to translate the latitude/longitude coordinates to pixel coordinates first. Look at line 566 in MapHeader.tpl:
var offset=map.getCurrentMapType().getProjection().fromLatLngToPixel(marker.getPoint(),map.getZoom());

Look here for the Google Maps API documentation: http://www.google.com/apis/maps/documentation/reference.html The "mouseout" event for the GMarker class is probably what you're looking for.

 
govegan

Joined: 2006-06-15
Posts: 17
Posted: Sun, 2008-05-18 16:35

Hello,

I'm having the same problem as the topic starter>

I have diferent pictures with the same gps coordinates, on the map I only see the first image, the rest is under it. is there a way when I click the pointer that it shows all the images of that coordinate?

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Sun, 2008-05-18 18:14

No, sorry, it's not that clever. I have some plans to make the markers shift outward when you click on them, with leaders to their original points (sort of how Google Earth does it), but I haven't had time to really look into implementing it. The rest of the module needs a lot of cleanup work first.

 
govegan

Joined: 2006-06-15
Posts: 17
Posted: Tue, 2008-06-17 08:43

ok siliconfriend,

That would be a great solution, I hope it wil be there soon.