RE: [Google Maps API v3] Re: MarkerCluster clickevent

2010-08-25 Thread Patrick Massas
Hi Luke,

 

Thanks very much ! it works fine.

Just a last thing : how to use the values (array ?) return by
cluster.getMarkers() ?

Sorry, but I'm a beginner with Javascript.

 

Regards

 

Patrick Massas

 

 

From: google-maps-js-api-v3@googlegroups.com
[mailto:google-maps-js-api...@googlegroups.com] On Behalf Of Luke Mahé
Sent: mardi 24 août 2010 03:00
To: google-maps-js-api-v3@googlegroups.com
Subject: Re: [Google Maps API v3] Re: MarkerCluster clickevent

 

Here you go:

 

google.maps.event.addListener(markerCluster, 'clusterclick',
function(cluster) {

  var center = cluster.getCenter();

  var size = cluster.getSize();

  var markers = cluster.getMarkers();

});

 

-- Luke

On Tue, Aug 24, 2010 at 1:49 AM, Pat45 pmas...@orange.fr wrote:

Hi Stephan,


Trying to use cluster.getSize(), cluster.getCenter() etc...with no
success.
Possible to see some example code ?

Thanks

Patrick

On 23 juil, 08:36, Stefan Karlsson stefan.k.r.karls...@gmail.com

wrote:
 Y that is awesome, exactly what I was looking for.
 Thank you very much for this, you saved my day.

 Stefan

 On 23 Juli, 07:37, Luke Mahé lu...@google.com wrote:



  Hey Stefan,

  This is possible, but I just updated the MarkerClusterer to make it
easier
  :) (So download the latest version
-http://code.google.com/p/google-maps-utility-library-v3/source/browse...
  )

  You can add an event listener to the markerClusterer 'clusterclick'
event:
  google.maps.event.addListener(markerCluster, 'clusterclick',
  function(cluster) {});

  Then you can get info about the cluster with:
cluster.getCenter();
cluster.getSize();
cluster.getMarkers();

  Does that do what you need?

  -- Luke

  On Thu, Jul 22, 2010 at 6:56 PM, Stefan Karlsson 

  stefan.k.r.karls...@gmail.com wrote:
   Just started to use MarkerCluster and now i'm looking for handling
   clickevents on clustered markers. What I want is if clicked on a dual
   marker (or more) I'd like to open a infowindow with content for all
   markers in this click. So what i'm looking for is the clickevent on
   markers and also a method to return the markers within that click.
   Thoght it would be standard functionality that should exist but did
   not found it in the references for MarkerCluster.

   Stefan

   --
   You received this message because you are subscribed to the Google
Groups
   Google Maps JavaScript API v3 group.
   To post to this group, send email to
   google-maps-js-api...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-maps-js-api-v3+unsubscr...@googlegroups.com
mailto:google-maps-js-api-v3%2bunsubscr...@googlegroups.com
google-maps-js-api-v3%2B unsubscr...@googlegroups.com
   .
   For more options, visit this group at

  http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Masquer le
texte des messages précédents -

 - Afficher le texte des messages précédents -

--

You received this message because you are subscribed to the Google Groups
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.com
mailto:google-maps-js-api-v3%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

 

-- 
You received this message because you are subscribed to the Google Groups
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



RE: [Google Maps API v3] Re: MarkerCluster clickevent

2010-08-25 Thread Patrick Massas
Hi Luke,

 

Possible to use InfoWindow.open when click on a cluster marker ?

 

Thanks

 

Patrick

 

From: google-maps-js-api-v3@googlegroups.com
[mailto:google-maps-js-api...@googlegroups.com] On Behalf Of Luke Mahé
Sent: mardi 24 août 2010 03:00
To: google-maps-js-api-v3@googlegroups.com
Subject: Re: [Google Maps API v3] Re: MarkerCluster clickevent

 

Here you go:

 

google.maps.event.addListener(markerCluster, 'clusterclick',
function(cluster) {

  var center = cluster.getCenter();

  var size = cluster.getSize();

  var markers = cluster.getMarkers();

});

 

-- Luke

On Tue, Aug 24, 2010 at 1:49 AM, Pat45 pmas...@orange.fr wrote:

Hi Stephan,


Trying to use cluster.getSize(), cluster.getCenter() etc...with no
success.
Possible to see some example code ?

Thanks

Patrick

On 23 juil, 08:36, Stefan Karlsson stefan.k.r.karls...@gmail.com

wrote:
 Y that is awesome, exactly what I was looking for.
 Thank you very much for this, you saved my day.

 Stefan

 On 23 Juli, 07:37, Luke Mahé lu...@google.com wrote:



  Hey Stefan,

  This is possible, but I just updated the MarkerClusterer to make it
easier
  :) (So download the latest version
-http://code.google.com/p/google-maps-utility-library-v3/source/browse...
  )

  You can add an event listener to the markerClusterer 'clusterclick'
event:
  google.maps.event.addListener(markerCluster, 'clusterclick',
  function(cluster) {});

  Then you can get info about the cluster with:
cluster.getCenter();
cluster.getSize();
cluster.getMarkers();

  Does that do what you need?

  -- Luke

  On Thu, Jul 22, 2010 at 6:56 PM, Stefan Karlsson 

  stefan.k.r.karls...@gmail.com wrote:
   Just started to use MarkerCluster and now i'm looking for handling
   clickevents on clustered markers. What I want is if clicked on a dual
   marker (or more) I'd like to open a infowindow with content for all
   markers in this click. So what i'm looking for is the clickevent on
   markers and also a method to return the markers within that click.
   Thoght it would be standard functionality that should exist but did
   not found it in the references for MarkerCluster.

   Stefan

   --
   You received this message because you are subscribed to the Google
Groups
   Google Maps JavaScript API v3 group.
   To post to this group, send email to
   google-maps-js-api...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-maps-js-api-v3+unsubscr...@googlegroups.com
mailto:google-maps-js-api-v3%2bunsubscr...@googlegroups.com
google-maps-js-api-v3%2B unsubscr...@googlegroups.com
   .
   For more options, visit this group at

  http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Masquer le
texte des messages précédents -

 - Afficher le texte des messages précédents -

--

You received this message because you are subscribed to the Google Groups
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.com
mailto:google-maps-js-api-v3%2bunsubscr...@googlegroups.com .
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

 

-- 
You received this message because you are subscribed to the Google Groups
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



Re: [Google Maps API v3] Re: MarkerCluster clickevent

2010-08-25 Thread Luke Mahé
It sure is. You should be able to do something along the lines of:

infowindow.setPosition(cluster.getPosition());
infowindow.setContent(YOUR_CONTENT_HERE);
infowindow.open(map);


-- Luke


On Wed, Aug 25, 2010 at 7:22 PM, Patrick Massas pmas...@orange.fr wrote:

  Hi Luke,



 Possible to use InfoWindow.open when click on a cluster marker ?



 Thanks



 Patrick



 *From:* google-maps-js-api-v3@googlegroups.com [mailto:
 google-maps-js-api...@googlegroups.com] *On Behalf Of *Luke Mahé
 *Sent:* mardi 24 août 2010 03:00
 *To:* google-maps-js-api-v3@googlegroups.com
 *Subject:* Re: [Google Maps API v3] Re: MarkerCluster clickevent



 Here you go:



 google.maps.event.addListener(markerCluster, 'clusterclick',
 function(cluster) {

   var center = cluster.getCenter();

   var size = cluster.getSize();

   var markers = cluster.getMarkers();

 });



 -- Luke

 On Tue, Aug 24, 2010 at 1:49 AM, Pat45 pmas...@orange.fr wrote:

 Hi Stephan,


 Trying to use cluster.getSize(), cluster.getCenter() etc...with no
 success.
 Possible to see some example code ?

 Thanks

 Patrick

 On 23 juil, 08:36, Stefan Karlsson stefan.k.r.karls...@gmail.com

 wrote:
  Y that is awesome, exactly what I was looking for.
  Thank you very much for this, you saved my day.
 
  Stefan
 
  On 23 Juli, 07:37, Luke Mahé lu...@google.com wrote:
 
 
 
   Hey Stefan,
 
   This is possible, but I just updated the MarkerClusterer to make it
 easier
   :) (So download the latest version -
 http://code.google.com/p/google-maps-utility-library-v3/source/browse...
   )
 
   You can add an event listener to the markerClusterer 'clusterclick'
 event:
   google.maps.event.addListener(markerCluster, 'clusterclick',
   function(cluster) {});
 
   Then you can get info about the cluster with:
 cluster.getCenter();
 cluster.getSize();
 cluster.getMarkers();
 
   Does that do what you need?
 
   -- Luke
 
   On Thu, Jul 22, 2010 at 6:56 PM, Stefan Karlsson 
 
   stefan.k.r.karls...@gmail.com wrote:
Just started to use MarkerCluster and now i'm looking for handling
clickevents on clustered markers. What I want is if clicked on a dual
marker (or more) I'd like to open a infowindow with content for all
markers in this click. So what i'm looking for is the clickevent on
markers and also a method to return the markers within that click.
Thoght it would be standard functionality that should exist but did
not found it in the references for MarkerCluster.
 
Stefan
 
--
You received this message because you are subscribed to the Google
 Groups
Google Maps JavaScript API v3 group.
To post to this group, send email to
google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.comgoogle-maps-js-api-v3%2bunsubscr...@googlegroups.comgoogle-maps-js-api-v3%2B
 unsubscr...@googlegroups.com
.
For more options, visit this group at

   http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Masquer
 le texte des messages précédents -
 
  - Afficher le texte des messages précédents -

 --

 You received this message because you are subscribed to the Google Groups
 Google Maps JavaScript API v3 group.
 To post to this group, send email to
 google-maps-js-api...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-maps-js-api-v3+unsubscr...@googlegroups.comgoogle-maps-js-api-v3%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-maps-js-api-v3?hl=en.



 --
 You received this message because you are subscribed to the Google Groups
 Google Maps JavaScript API v3 group.
 To post to this group, send email to
 google-maps-js-api...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-maps-js-api-v3+unsubscr...@googlegroups.comgoogle-maps-js-api-v3%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-maps-js-api-v3?hl=en.

   --
 You received this message because you are subscribed to the Google Groups
 Google Maps JavaScript API v3 group.
 To post to this group, send email to
 google-maps-js-api...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-maps-js-api-v3+unsubscr...@googlegroups.comgoogle-maps-js-api-v3%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-maps-js-api-v3?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: MarkerCluster clickevent

2010-07-26 Thread Stefan Karlsson
Now the clickevent works fine but I'd also look for mouse over and
and right click event.

What I am about to implement is clustered markers that with mouse over
returns the titles of all the markers in that cluster.
Click zoom in as default.
Right click open a infowindow with information of the markers.

This could all be done if a similar function as:
google.maps.event.addListener(markerCluster, 'clusterclick',
function(cluster) {});  is implemented with clusterRightClick and
clusterMouseOver events and with access of: cluster.getCenter();,
cluster.getSize(); and  cluster.getMarkers(); 

Right now I don't have any public URL to show but I will add this in
the near future. Btw I was unsure if I was suppose to start a new
thread but I thought this was in a similar scope I hope this is ok
event though it is outside the scope of the topic.

Stefan

On 23 Juli, 08:36, Stefan Karlsson stefan.k.r.karls...@gmail.com
wrote:
 Y that is awesome, exactly what I was looking for.
 Thank you very much for this, you saved my day.

 Stefan

 On 23 Juli, 07:37, Luke Mahé lu...@google.com wrote:



  Hey Stefan,

  This is possible, but I just updated the MarkerClusterer to make it easier
  :) (So download the latest version 
  -http://code.google.com/p/google-maps-utility-library-v3/source/browse...
  )

  You can add an event listener to the markerClusterer 'clusterclick' event:
  google.maps.event.addListener(markerCluster, 'clusterclick',
  function(cluster) {});

  Then you can get info about theclusterwith:
   cluster.getCenter();
   cluster.getSize();
   cluster.getMarkers();

  Does that do what you need?

  -- Luke

  On Thu, Jul 22, 2010 at 6:56 PM, Stefan Karlsson 

  stefan.k.r.karls...@gmail.com wrote:
   Just started to use MarkerCluster and now i'm looking for handling
   clickevents on clustered markers. What I want is if clicked on a dual
   marker (or more) I'd like to open a infowindow with content for all
   markers in this click. So what i'm looking for is the clickevent on
   markers and also a method to return the markers within that click.
   Thoght it would be standard functionality that should exist but did
   not found it in the references for MarkerCluster.

   Stefan

   --
   You received this message because you are subscribed to the Google Groups
   Google Maps JavaScript API v3 group.
   To post to this group, send email to
   google-maps-js-api...@googlegroups.com.
   To unsubscribe from this group, send email to
   google-maps-js-api-v3+unsubscr...@googlegroups.comgoogle-maps-js-api-v3%2B
unsubscr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: MarkerCluster clickevent

2010-07-26 Thread Stefan Karlsson
When added a infoWindow I had problems finding what was the MVCObject
to use with infoWindow.open(map, MVCObject). I made an implementation
of setPosition on the InfoWindow instead and that works fine
(infoWindow.open(map); infoWindow.setPosition(cluster.getCenter());).
But is there any way to do this in one step with something similar to:
infoWindow.open(map, cluster);?

Stefan

On 26 Juli, 10:51, Stefan Karlsson stefan.k.r.karls...@gmail.com
wrote:
 Now the clickevent works fine but I'd also look for mouse over and
 and right click event.

 What I am about to implement is clustered markers that with mouse over
 returns the titles of all the markers in thatcluster.
 Click zoom in as default.
 Right click open a infowindow with information of the markers.

 This could all be done if a similar function as:
 google.maps.event.addListener(markerCluster, 'clusterclick',
 function(cluster) {});  is implemented with clusterRightClick and
 clusterMouseOver events and with access of: 
 cluster.getCenter();,cluster.getSize(); and  cluster.getMarkers(); 

 Right now I don't have any public URL to show but I will add this in
 the near future. Btw I was unsure if I was suppose to start a new
 thread but I thought this was in a similar scope I hope this is ok
 event though it is outside the scope of the topic.

 Stefan

 On 23 Juli, 08:36, Stefan Karlsson stefan.k.r.karls...@gmail.com
 wrote:



  Y that is awesome, exactly what I was looking for.
  Thank you very much for this, you saved my day.

  Stefan

  On 23 Juli, 07:37, Luke Mahé lu...@google.com wrote:

   Hey Stefan,

   This is possible, but I just updated the MarkerClusterer to make it easier
   :) (So download the latest version 
   -http://code.google.com/p/google-maps-utility-library-v3/source/browse...
   )

   You can add an event listener to the markerClusterer 'clusterclick' event:
   google.maps.event.addListener(markerCluster, 'clusterclick',
   function(cluster) {});

   Then you can get info about theclusterwith:
    cluster.getCenter();
    cluster.getSize();
    cluster.getMarkers();

   Does that do what you need?

   -- Luke

   On Thu, Jul 22, 2010 at 6:56 PM, Stefan Karlsson 

   stefan.k.r.karls...@gmail.com wrote:
Just started to use MarkerCluster and now i'm looking for handling
clickevents on clustered markers. What I want is if clicked on a dual
marker (or more) I'd like to open a infowindow with content for all
markers in this click. So what i'm looking for is the clickevent on
markers and also a method to return the markers within that click.
Thoght it would be standard functionality that should exist but did
not found it in the references for MarkerCluster.

Stefan

--
You received this message because you are subscribed to the Google 
Groups
Google Maps JavaScript API v3 group.
To post to this group, send email to
google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to
google-maps-js-api-v3+unsubscr...@googlegroups.comgoogle-maps-js-api-v3%2B
 unsubscr...@googlegroups.com
.
For more options, visit this group at
   http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.



[Google Maps API v3] Re: MarkerCluster clickevent

2010-07-23 Thread Stefan Karlsson
Y that is awesome, exactly what I was looking for.
Thank you very much for this, you saved my day.

Stefan

On 23 Juli, 07:37, Luke Mahé lu...@google.com wrote:
 Hey Stefan,

 This is possible, but I just updated the MarkerClusterer to make it easier
 :) (So download the latest version 
 -http://code.google.com/p/google-maps-utility-library-v3/source/browse...
 )

 You can add an event listener to the markerClusterer 'clusterclick' event:
 google.maps.event.addListener(markerCluster, 'clusterclick',
 function(cluster) {});

 Then you can get info about the cluster with:
   cluster.getCenter();
   cluster.getSize();
   cluster.getMarkers();

 Does that do what you need?

 -- Luke

 On Thu, Jul 22, 2010 at 6:56 PM, Stefan Karlsson 



 stefan.k.r.karls...@gmail.com wrote:
  Just started to use MarkerCluster and now i'm looking for handling
  clickevents on clustered markers. What I want is if clicked on a dual
  marker (or more) I'd like to open a infowindow with content for all
  markers in this click. So what i'm looking for is the clickevent on
  markers and also a method to return the markers within that click.
  Thoght it would be standard functionality that should exist but did
  not found it in the references for MarkerCluster.

  Stefan

  --
  You received this message because you are subscribed to the Google Groups
  Google Maps JavaScript API v3 group.
  To post to this group, send email to
  google-maps-js-api...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-maps-js-api-v3+unsubscr...@googlegroups.comgoogle-maps-js-api-v3%2B 
  unsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Maps JavaScript API v3 group.
To post to this group, send email to google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.