PHP Classes

Points

Recommend this page to a friend!

      Simple GMap API  >  All threads  >  Points  >  (Un) Subscribe thread alerts  
Subject:Points
Summary:Two entries on same address location
Messages:2
Author:Tony Iha Kazungu
Date:2011-04-28 09:21:27
Update:2011-05-19 18:01:43
 

  1. Points   Reply   Report abuse  
Picture of Tony Iha Kazungu Tony Iha Kazungu - 2011-04-28 09:21:27
Thanks for the nice script working like magic for me.

Have some problem on displaying to entries sharing the same location.
I am mapping some partner organization and it appears that two or more organizations could share the same address.

e.g organization - Location/lat/long
Organization A - Kilifi/3.63045/39.8499184
Organization B - Kilifi/3.63045/39.8499184

When this is is mapped only one point is shown
1. Is it possible to display the x number of organization on one point or
2. Display on the tooltip all the organizations on that location
3. To display the information of all the organizations when you click on the point


I am pulling the data from a database and looping through the records.

while ($row = fetch_object($results)) {
$map->addMarker($row->latitude, $row->longitude, "$row->organization", "$row->location, $row->start_date, $row->end_date, $row->amount<br /><img src=\"", "images/$mapmarker");
}

thanks

  2. Re: Points   Reply   Report abuse  
Picture of Heiko Holtkamp Heiko Holtkamp - 2011-05-19 18:01:43 - In reply to message 1 from Tony Iha Kazungu
Hi Tony,

I'm sorry for my (very) late reply but there was a heavy workload during the last weeks and I'm not looking regulary at this this site.

>Have some problem on displaying to entries sharing the same location.
>
>e.g organization - Location/lat/long
>Organization A - Kilifi/3.63045/39.8499184
>Organization B - Kilifi/3.63045/39.8499184
>
>When this is is mapped only one point is shown

Yes, that's right but there are actually two points set on the map but both share the same coordinates so that you can only see one point.

>1. Is it possible to display the x number of organization on one point or
>2. Display on the tooltip all the organizations on that location
>3. To display the information of all the organizations when you click on
> the point

All of the three options are possible, but you will have to code it yourself. For example you can use the Info Window or tooltip for this. You can fetch your information from the database an fill in the text you want to display if there are two point at the same coordinates:

$map->addMarker(52.0149436, 8.5275128, "This is the parameter where you have to fill in the text for a tooltip.", "And this is the place where you have to fill in the text for the info window.", "http://google-maps-icons.googlecode.com/files/museum-archeological.png");


Hope this helps