Google Groups Home
Help | Sign in
Idea- Using GPolygon as indication of marker selection
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
This discussion is about page examples-tutorials-gpolygon-gpolyline
flag
  23 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
examples-tutorials-gpolygon-gpolyline was changed (view version 15) by pamela (Google Employee)
pamela (Google Employee)  
View profile
(1 user)  More options Feb 8 2007, 5:58 pm
From: "pamela (Google Employee)" <api.pamela...@google.com>
Date: Thu, 08 Feb 2007 09:58:26 -0000
Local: Thurs, Feb 8 2007 5:58 pm
Subject: Idea- Using GPolygon as indication of marker selection
Hi all-
I was working on the polyline encoding utility last night and realized
that using a GPolygon to indicate a selected marker is much easier
than creating special icons (new GMarker objects) for a selected
marker. I thought it would be slow when used with the marker drag
event, but after testing on IE, Safari, and FF, it seems to work
smoothly.
I put together a simple example here:
http://maps.examples.googlepages.com/highlightmarker.html
It basically uses the code from my blog post example plus the code
from the marker example on the documentation, plus a few extra lines.
Just thought I'd put the idea out there. Let me know if you see any
issues with the example.

Click on http://groups.google.com/group/Google-Maps-API/web/examples-tutorials...
- or copy & paste it into your browser's address bar if that doesn't
work.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Williams  
View profile
 More options Feb 8 2007, 7:25 pm
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Thu, 8 Feb 2007 11:25:48 +0000
Local: Thurs, Feb 8 2007 7:25 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
That's pretty neat.

It's a pity that Google have now pushed v2.72 without fixing the marker
dragging bug (the second bug listed on the Known/Possible API bugs page)
so your example now throws Javascript errors.

In FF, the page works fine, but throws this error:
        a has no properties
        line 600 http://maps.google.com/mapfiles/maps2.72.api.js
whenever you drag a marker.

In MSIE6, the error is
        'undefined' is null or not an object
        Line 601, char 59
and the marker dragend animation fails, leaving the dragged marker
floating 13 pixels above the dragcross.

--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile
 More options Feb 8 2007, 7:41 pm
From: "pamela (Google Employee)" <api.pamela...@google.com>
Date: Thu, 08 Feb 2007 11:41:07 -0000
Local: Thurs, Feb 8 2007 7:41 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
I didn't realize IE was throwing errors as well, but you're correct. I
must have not tested dragging in IE.
I'll see if I can get rid of the IE error somehow, I don't think
that's the same as the FF bug. Thanks for catching that.

They do know about the Firefox dragging error, it should be fixed in a
release soon.

On Feb 8, 3:25 am, Mike Williams <nos...@econym.demon.co.uk> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile
 More options Feb 8 2007, 7:47 pm
From: "pamela (Google Employee)" <api.pamela...@google.com>
Date: Thu, 08 Feb 2007 11:47:37 -0000
Local: Thurs, Feb 8 2007 7:47 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection

http://www.google.com/apis/maps/documentation/dragmarker.html produces
the same result.
I didn't realize the dragging error caused that sort of break in the
execution in IE6.
That's certainly more of a concern than the FF error that doensn't
stop the dragging.
(They may well be the same error).
I'll forward this on. Thanks for the catch, Mike.

On Feb 8, 3:41 am, "pamela (Google Employee)"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile
 More options Feb 8 2007, 7:53 pm
From: "pamela (Google Employee)" <api.pamela...@google.com>
Date: Thu, 08 Feb 2007 11:53:52 -0000
Local: Thurs, Feb 8 2007 7:53 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
Addendum: I keep forgetting that the documentation examples use
version 2, and I frequently use 2 in my examples. That bug is fixed in
2.x (2.73). I'll change the version #.

On Feb 8, 3:47 am, "pamela (Google Employee)"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile
 More options Feb 8 2007, 7:57 pm
From: "pamela (Google Employee)" <api.pamela...@google.com>
Date: Thu, 08 Feb 2007 11:57:27 -0000
Local: Thurs, Feb 8 2007 7:57 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
Mike, can you check the example now? (reload)
I'm planning on using this type of highlighting in several map apps
I'm working on, and I appreciate your feedback on improving it.
Thanks!

On Feb 8, 3:53 am, "pamela (Google Employee)"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mapperz@googlemail.com  
View profile
 More options Feb 8 2007, 8:12 pm
From: "mapp...@googlemail.com" <mapp...@googlemail.com>
Date: Thu, 08 Feb 2007 12:12:30 -0000
Local: Thurs, Feb 8 2007 8:12 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
Question:
Can the example work in reverse, creating a GPolygon to highlight
Markers within it?

Select_Markers_by_Location.jpg
(located in 'Files' in this group is how mapperz would do this in
ArcGIS)

mapperz
http://mapperz.blogspot.com/

On Feb 8, 9:58 am, "pamela (Google Employee)"


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile
 More options Feb 8 2007, 8:24 pm
From: "pamela (Google Employee)" <api.pamela...@google.com>
Date: Thu, 08 Feb 2007 12:24:02 -0000
Local: Thurs, Feb 8 2007 8:24 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
It seems like a GPolygon created by clicking points could do that. I
don't think the code in this example is particularly helpful. I've got
another example that uses the classic drag-a-div-with-a-border to
select markers, but of course the advantage of a GPolygon is that it
can be of arbitrary shape. A non-rectangle is harder to look for
markers within, but I believe we've had discussions here about the
math functions required to do that.
Are you up to tackling it, or should I put it on my to-do list? :)

On Feb 8, 4:12 am, "mapp...@googlemail.com" <mapp...@googlemail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Williams  
View profile
(1 user)  More options Feb 8 2007, 10:18 pm
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Thu, 8 Feb 2007 14:18:09 +0000
Local: Thurs, Feb 8 2007 10:18 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
Wasn't it pamela (Google Employee) who wrote:

>Mike, can you check the example now? (reload)
>I'm planning on using this type of highlighting in several map apps
>I'm working on, and I appreciate your feedback on improving it.
>Thanks!

Moving to v2.73 does solve the bug.

Another little thing you might like to do to improve the example would
be to recalculate the size of the polygon when the zoom changes.
It looks a little bit silly if you zoom in five or six levels without
happening to mouseover a marker (which would redraw the polygon at a
suitable size for the new zoom level).

--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile
 More options Feb 8 2007, 10:32 pm
From: "pamela (Google Employee)" <api.pamela...@google.com>
Date: Thu, 08 Feb 2007 14:32:52 -0000
Local: Thurs, Feb 8 2007 10:32 pm
Subject: Re: Idea- Using GPolygon as indication of marker selection
I'll be adding that in. I noticed it myself in the other app I've been
using it for where I actually had a desire to zoom in/out.
Should be fixed within the hour. Thanks! :)

On Feb 8, 6:18 am, Mike Williams <nos...@econym.demon.co.uk> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile