[Google Maps API v3] Re: Polyline Clipping

2010-11-07 Thread bratliff
I have made several improvements. It ought to work correctly regardless of tile size. I have added "click" / "cover" capabilities. Instead of individual event listeners for every poly, you add a single event listener for the entire PolyCluster. For "mousedown" / "mouseup", use: cluster.set

[Google Maps API v3] Re: Polyline Clipping

2010-10-11 Thread Tim G
Berry, I do need lines wider than 256 at times so I'll keep setPixel at 10. The auto-adjusting of the weights based on zoom level is nice and thanks for fixing the clean-up of the polys. It's allowed me to simplify some of the code in my app quite a bit and the whole thing works great. Thanks ag

[Google Maps API v3] Re: Polyline Clipping

2010-10-10 Thread bratliff
Try: http://www.polylib.us/polycluster/short You will notice the weights are automatically adjusted for zoom level, something you cannot do with the API. It is not completely corrected but it ought to work for weights between 1 and 256. If 256 is not enough, you can expand the tile size wit

[Google Maps API v3] Re: Polyline Clipping

2010-10-10 Thread bratliff
On Oct 9, 7:28 pm, Tim G wrote: > Berry, > > You were right, I had to load the blank array and then run setColor > and it works like a charm. My app is 99% converted from v2 to v3 > thanks to polycluster. Thanks so much for creating it, it is > incredibly useful to me. Is there someplace where

[Google Maps API v3] Re: Polyline Clipping

2010-10-09 Thread Tim G
Berry, You were right, I had to load the blank array and then run setColor and it works like a charm. My app is 99% converted from v2 to v3 thanks to polycluster. Thanks so much for creating it, it is incredibly useful to me. Is there someplace where you announce new versions of polycluster so

[Google Maps API v3] Re: Polyline Clipping

2010-10-09 Thread bratliff
On Oct 9, 2:54 pm, Tim G wrote: > cluster.setPixel(10); seems to have done the trick as far as fixing > the rendering issues. I've also simplified the map quite a bit if you > still need that. > > One thing I did add was a "Remove Polycluster" button for testing > purposes but I can't get it to w

[Google Maps API v3] Re: Polyline Clipping

2010-10-09 Thread Tim G
cluster.setPixel(10); seems to have done the trick as far as fixing the rendering issues. I've also simplified the map quite a bit if you still need that. One thing I did add was a "Remove Polycluster" button for testing purposes but I can't get it to work. I create an empty array as so (shorttr

[Google Maps API v3] Re: Polyline Clipping

2010-10-09 Thread bratliff
On Oct 8, 6:38 pm, Tim G wrote: > Berry, > > Here you go, as simple as it gets (hopefully!). I set the stroke to > 300px. Typically I'd use a ~300px stroke when you're zoomed in pretty > close. Zooming in further, I'd just remove the poly so you get a > clear map view. Zooming out, I'd make th

[Google Maps API v3] Re: Polyline Clipping

2010-10-09 Thread bratliff
On Oct 8, 6:38 pm, Tim G wrote: > Berry, > > Here you go, as simple as it gets (hopefully!). I set the stroke to > 300px. Typically I'd use a ~300px stroke when you're zoomed in pretty > close. Zooming in further, I'd just remove the poly so you get a > clear map view. Zooming out, I'd make th

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread Tim G
Berry, Here you go, as simple as it gets (hopefully!). I set the stroke to 300px. Typically I'd use a ~300px stroke when you're zoomed in pretty close. Zooming in further, I'd just remove the poly so you get a clear map view. Zooming out, I'd make the stroke more narrow, eliminating the issue

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread Tim G
Berry, Here you go, as simple as it gets (hopefully!). I set the stroke to 300px. Typically I'd use a ~300px stroke when you're zoomed in pretty close. Zooming in further, I'd just remove the poly so you get a clear map view. Zooming out, I'd make the stroke more narrow, eliminating the issue

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread bratliff
On Oct 8, 4:15 pm, Tim G wrote: > Berry, > > I figured out I can just reload the polycluster object and it deleted > the old overlay. So with that sorted, everything seems to be working > well except at the higher zoom levels there seems to be issues > rendering the line similar to the problems I

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread Tim G
Berry, I figured out I can just reload the polycluster object and it deleted the old overlay. So with that sorted, everything seems to be working well except at the higher zoom levels there seems to be issues rendering the line similar to the problems I was having using the Google's Polyline. He

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread Tim G
Berry, I think I've fixed a couple of errors on my own. One thing, is there a way to remove the polycluster after creating it? I tried polycluster.setMap(null) but it's throwing an error. Once I get that sorted I should have some code to share with you. - Tim On Oct 8, 11:10 am, bratliff wro

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread bratliff
On Oct 8, 2:01 pm, Tim G wrote: > Ah, sorry about that. I have tried to simplify it a little more. You > can find my use of polycluster on line 331 of the file below: > > http://www.dgcoursereview.com/google_example/templates/routemap_main_... > > highPoints is the array of points from the direct

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread Tim G
Ah, sorry about that. I have tried to simplify it a little more. You can find my use of polycluster on line 331 of the file below: http://www.dgcoursereview.com/google_example/templates/routemap_main_cluster.js highPoints is the array of points from the directions polyline. I convert them to the

[Google Maps API v3] Re: Polyline Clipping

2010-10-08 Thread bratliff
On Oct 8, 12:58 am, Tim G wrote: > Berry, > > Did you get a chance to look at this yet? All I'm doing is taking the > directions polyline point for point and feeding it into polycluster. > Perhaps it's too many points? I did look at it but decided it contained too much unrelated code. I could no

[Google Maps API v3] Re: Polyline Clipping

2010-10-07 Thread Tim G
Berry, Did you get a chance to look at this yet? All I'm doing is taking the directions polyline point for point and feeding it into polycluster. Perhaps it's too many points? On Oct 6, 4:05 pm, bratliff wrote: > On Oct 6, 6:09 pm, Tim G wrote: > > > Berry, > > > I'm trying to use polycluster t

[Google Maps API v3] Re: Polyline Clipping

2010-10-06 Thread bratliff
On Oct 6, 6:09 pm, Tim G wrote: > Berry, > > I'm trying to use polycluster to get the line going without much > success. I'm able to get the line initially (although at a high zoom > there are artifacts) but trying to zoom, move the map, etc. doesn't > work so well after the initial rendering. A

[Google Maps API v3] Re: Polyline Clipping

2010-10-06 Thread Tim G
Berry, I'm trying to use polycluster to get the line going without much success. I'm able to get the line initially (although at a high zoom there are artifacts) but trying to zoom, move the map, etc. doesn't work so well after the initial rendering. Any idea what I'm doing wrong? http://www.dg

[Google Maps API v3] Re: Polyline Clipping

2010-10-06 Thread bratliff
I have built a couple of demos using PolyCluster: http://www.polylib.us/polycluster/coast/simple.html http://www.polylib.us/polycluster/coast/advanced.html The line width is essentially unlimited. It is never a performance issue unless it exceeds twice the tile size. "weight:0" thru "w

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread geocode...@gmail.com
On Oct 5, 6:17 pm, Tim G wrote: > Thanks Larry.  I'm not sure what I can do on the lobbying front but > I'll at least put it in there and keep my fingers crossed. First thing would be to post a link to the issue in this thread, like this: http://code.google.com/p/gmaps-api-issues/issues/detail?id

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
Thanks Larry. I'm not sure what I can do on the lobbying front but I'll at least put it in there and keep my fingers crossed. On Oct 5, 9:14 pm, "geocode...@gmail.com" wrote: > On Oct 5, 5:56 pm, Tim G wrote: > > > I agree with Larry, it would be nice if there was some alternate > > solution th

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread geocode...@gmail.com
On Oct 5, 5:56 pm, Tim G wrote: > I agree with Larry, it would be nice if there was some alternate > solution that at least gave you something comparable to v2 > functionality when you use similar classes. Based on Ben Appletons post: + If there's a lot of demand we can look into allowing much hi

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
I agree with Larry, it would be nice if there was some alternate solution that at least gave you something comparable to v2 functionality when you use similar classes. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to t

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread geocode...@gmail.com
On Oct 5, 4:25 pm, Ben Appleton wrote: > The problem is that the API assumes the maximum stroke weight is 10 > pixels.  Assuming a maximum stroke weight allows the API to render > faster, by skipping polylines that are out of range. > > We could enforce this maximum stroke weight.  That would mean

Re: [Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Ben Appleton
Update: to avoid these visual artifacts I have enforced the maximum stroke weight. Polys with a higher stroke weight will be rendered at the maximum supported stroke weight. If there's a lot of demand we can look into allowing much higher stroke weights, bearing in mind that this may slow down re

Re: [Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Ben Appleton
The problem is that the API assumes the maximum stroke weight is 10 pixels. Assuming a maximum stroke weight allows the API to render faster, by skipping polylines that are out of range. We could enforce this maximum stroke weight. That would mean you can't render a polyline with a stroke weight

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
Ah... that's not too encouraging. Although in the second test url I gave, if you make a large "C" using 4 markers, the line ends up joining on itself in the middle of the "C" (in addition to lots and lots of clipping). I was hoping to shift map development on my site to v3 but the wide polyline i

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Rossko
I think it is a variation on this issue http://code.google.com/p/gmaps-api-issues/issues/detail?id=2337 see also this thread http://groups.google.com/group/google-maps-js-api-v3/browse_thread/thread/2b6f7d984072e663/e280e3f36eb82115 Problem seems to be the API 'forgets' to render polys crossing ce

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
Another example.. http://greatwarehouse.com/test.htm That's the google complex polyline sample and I just bumped up the width to 195. Very bizarre results when you start clicking around. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
Chad, here is a link to the map: http://www.dgcoursereview.com/google_example/beta_route_map.php The highlight does go away once you zoom in beyond a certain point so that is normal. On Oct 5, 10:28 am, Chad Killingsworth wrote: > That's interesting. I'm guessing that the clipping happens at th

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
Chad, here is a link: http://www.dgcoursereview.com/google_example/beta_route_map.php I do remove the orange highlight once you zoom in past a certain point so that is normal. On Oct 5, 10:28 am, Chad Killingsworth wrote: > That's interesting. I'm guessing that the clipping happens at the > bou

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Chad Killingsworth
That's interesting. I'm guessing that the clipping happens at the bounds of the polyline tiles and it especially evident since you are using a very large stroke weight A link to your map would help verify this. If true - it would be a bug (or an unintended side-effect). Chad Killingsworth On Oct

[Google Maps API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
Example 1 image: http://www.greatwarehouse.com/images/gmap_example1.gif Example 2 image: http://www.greatwarehouse.com/images/gmap_example2.gif -- 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 API v3] Re: Polyline Clipping

2010-10-05 Thread Tim G
Example 1 image: http://www.greatwarehouse.com/images/gmapexample1.gif Example 2 image: http://www.greatwarehouse.com/images/gmapexample2.gif -- 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