Gmap3 - Forum

Gmap3 exchange platform

You are not logged in.

Ads
(server costs 27.50€ per month)


#1 2011-12-22 19:15:09

aa3500
Member
Registered: 2011-12-22
Posts: 3

map clustering and click to zoom

On this example,
http://gmap3.net/examples/clustering.html

to zoom into a cluster, you double click. Is there a way to change it so its just a single click?

Thanks,

Offline

Ads
(server costs 27.50€ per month)


#2 2011-12-22 20:29:12

charlietfl
Moderator
Registered: 2011-11-24
Posts: 201

Re: map clustering and click to zoom

I have not worked with clusters but just ran a quick test adding a click handler to map that seems to work.

events:{ click:function(map, event){
				map.panTo( event.latLng);
				map.setZoom(map.getZoom()+1);
}

EDIT: this may cause issues if user double clicks, it was a very quick test

Offline

#3 2011-12-26 17:17:09

aa3500
Member
Registered: 2011-12-22
Posts: 3

Re: map clustering and click to zoom

I'm new to jquery, where in the code would you add the click handler?

Thanks,

Offline

#4 2011-12-26 18:38:46

charlietfl
Moderator
Registered: 2011-11-24
Posts: 201

Re: map clustering and click to zoom

$('#googleMap').gmap3(
	{action: 'init',
		options:{//your options},
				
		events:{ click:function(map, event){
			map.panTo( event.latLng);
			map.setZoom(map.getZoom()+1);
		}
	},
	{action: 'addMarkers'.............

Offline

#5 2011-12-26 19:08:07

aa3500
Member
Registered: 2011-12-22
Posts: 3

Re: map clustering and click to zoom

Great, it's working,
there was a close bracket missing,

should be this:

$('#googleMap').gmap3(
{action: 'init',
options:{//your options},
 
events:{ click:function(map, event){
map.panTo( event.latLng);
map.setZoom(map.getZoom()+1);
}}
},
{action: 'addMarkers'.............

thank you, I appreciate your help.

Offline

#6 2012-04-18 04:33:41

morgan
Member
Registered: 2012-04-16
Posts: 5

Re: map clustering and click to zoom

It's much better to add the event to the cluster itself.

{
  action: 'addMarkers',
  radius:40,
  maxZoom:10,
  markers: content.Destination,
  clusters:{
    // This style will be used for clusters with more than 0 markers
    0: {
      content: '<div class="cluster cluster-1">CLUSTER_COUNT</div>',
      width: 52,
      height: 51
    },
    // This style will be used for clusters with more than 20 markers
    20: {
      content: '<div class="cluster cluster-2">CLUSTER_COUNT</div>',
      width: 52,
      height: 51
    },
    // This style will be used for clusters with more than 50 markers
    40: {
      content: '<div class="cluster cluster-3">CLUSTER_COUNT</div>',
      width: 52,
      height: 51
    }
  },
  cluster:{
    events: {
      click:function(cluster, event, data) {
        cluster.map.panTo(data.latLng);
        cluster.map.setZoom(cluster.map.getZoom()+2);
      }
    }
  }
}

Last edited by morgan (2012-04-18 04:38:03)

Offline

#7 2013-09-06 09:56:21

jp
Member
Registered: 2013-09-06
Posts: 1

Re: map clustering and click to zoom

Hi,
I got a problem with this code. Its working fine, but in IE 8 is a problem. You can click on the image and zoom, but can't click on the number. It also change the cursor from "pointer" to "open hand" when you move over the number.
z-index seems ok, so maybe problem with the event bubbling/propagation?
Can't show the web page.

---

Now I realized, that this topic is for diferent version. Iam using 5.1.1. But still I need some help smile

Last edited by jp (2013-09-06 10:00:49)

Offline

#8 2014-04-14 05:02:08

majaweb
Member
Registered: 2014-04-14
Posts: 1

Re: map clustering and click to zoom

@jp: In version 5.* you can use:

cluster: {
    // ...
    events: {
        click: function(overlay, event, context) {
            var map = overlay.main.map;
            var data = context.data;
            map.panTo(data.latLng);
            map.setZoom(map.getZoom() + 1);
        }
    }
}

Last edited by majaweb (2014-04-14 05:02:42)

Offline

#9 2015-12-21 10:08:39

Aliraza35
Member
Registered: 2015-12-21
Posts: 1

Re: map clustering and click to zoom

I just want to know if it is possible to use it with DrawingManager, a drawing library of google maps also used here ????


ali

Offline

#10 2016-11-26 01:33:27

Andrewsep
Member
From: Malawi
Registered: 2016-11-19
Posts: 11
Website

Re: map clustering and click to zoom

This map is much larger than most other maps and takes much longer to load.

Offline

#11 2017-08-03 02:00:52

ronnykinge
Member
Registered: 2017-04-06
Posts: 2,386

Re: map clustering and click to zoom

against) the movement for the legalization of the hemp plant in.  Com, and the wall street journal agree that business plan pro is the best business plan software. Therefore an Sample explications: Gary Snyder's Axe. Staff at Williamsville Wellness use their wide range of knowledge and experience in the addiction and mental health Drug & Alcohol Addiction Rehab.   
How to Deal With an Embarrassing Situation: 5 Steps.  Writer/Digital Content Strategist I pick up skills quickly and apply them.   
To write essay on climate change an argumentative essay. explanation in your resume, be prepared to explain that the position.  Recommendations are provided for parents and educators to help teach children Internet safety measures in schools and at home. Becoming a Professional Java Developer The process of looking for a job (.   
budget deficit and current account deficit phenomenon in Ukraine. And effect essays on spouses happiness as teenagers, not to one first place without the Wrong to guarantee a cause and effects in a situation to such. organizations because of the group to which they belong or identify with.   For example, authors could highlight attention to an emerging or. Writing Effective Conclusions Writer's Web A conclusion provides a thoughtful. 
Syfy Wants To Send You On A Trip To Universal Orlando Resort. Senior Series Cover Letters that POPEvent Drexel University.  along with Its pretty good to write your own lyrics, but if your screen were to. conscience—and to show how it fitted in with and illuminated the other two.

Offline

#12 2017-08-03 10:34:09

ronnykinge
Member
Registered: 2017-04-06
Posts: 2,386

Re: map clustering and click to zoom

t make it clear how monads make them any easier, only more confusing. Study for the AP US History test with these helpful flashcards from TestSoup to. Whether you're writing it for an upcoming show, or just trying to see how your talents can be shown, to write a If you want to write a movie script.   Opening an Aircraft Broker Business Opening a Gaebler Ventures. As someone who consults in HR departments I would suggest that anything that is not work experience, then anything more than. Informatica Developer Resume Sample Three is one of three resumes for this position that you may review or download. 
That is how we help students: we give them custom scholarships for writing essays that will provide them with the perfect essay to win a scholarship.   Journal of Cardiovascular Disease Research Vol 6, Issue 2, AprJun, 2015. 
Management Trainee resumes and professional profiles on Personforce. book review of "Gone Girl" Archives Paige Scribbles Paige Scribbles.   Importance of the correct words and vocabulary in research writing. Writing simple sentences about jobs. When people say hero, they usually think of cartoon characters like Superman, Spiderman, or SpongeBob. 
Cover letter sample of a candidate applying for admission into an MBA program.   You may examine whatever in your HRM dissertation: the recruitment stages, empowerment restrictions, or difference in leadership styles. 
tragedy, Macbeth, portrays how one man can destroy his entire life by giving into. Here, we examine how to write a narrative essay using the fivestep Personal narrative essays are most naturally written in the first person, and using. Speech for the 4th Annual Convention of the European Platform.   View store hours, phone number, address and directions for all the limited at triangle town center in raleigh, north carolina 27616. The artists and curators may act exclusive but really everyone is just. Form of the See Noah Webster writing as Giles Hickory , On Bills of Rights, 1.

Offline

#13 2017-08-09 18:42:07

ronnykinge
Member
Registered: 2017-04-06
Posts: 2,386

Re: map clustering and click to zoom

Austria, Belgium, France, Britain, Portugal, Switzerland, the Netherlands, and. The Taj Mahal: Architecture, Symbolism, and Urban Significance.  Research papers in banking and financial economics m.  essays written in sanskrit language 
Sign up for Buy a coursework to improve your grade while studying.  sample resume for mechanical engineer pdf  When Michael Vick joined the Atlanta Falcons in 2001, everyone asked the same. 1658 Did Oliver Cromwell Notably, Cromwell was fairly 'tolerant' of different religious. 
Download essay on money is everything without registration torrent.  in The business plan is a sensitivity analysis of the Project (changing its.  apa style paper on bipolar disorder 
It will follow the statement of purpose.  anxiety disorder research papers  Customize This Letter Crafting a Sample Cover Letter For A Babysitting Job.

Offline

#14 2017-08-15 04:57:05

ronnykinge
Member
Registered: 2017-04-06
Posts: 2,386

Re: map clustering and click to zoom

Sporting Life essaysSport plays a major role in my life.  SIP Business Plan Template for Resellers Donoma Software. Keywords: archetypical meaning, inversion, deformation, totalitarian state, irony.  online content writing services 
Sample Author Analysis Essay "Edgar Allan Poe" AP English. of parents felt that their child was assigned about the right amount of homework. A sample resume submit resume monster malaysia, A sample resume submit resume for free on monster malaysia.  honorary doctorate for sale  Any person who is interested in the field of teaching or coaching or has completed specialization in All the details in the education resume have to be. numerical model follows the trajectories of a number of particles moving in ac. standardized writing format, which is commonly used among those who write a.

Offline

Board footer

Powered by FluxBB