[Google Maps API v3] Google Maps API Office Hours This Week: Two of Them (Europe/US/Africa/Latin America and Asia/Australia)

2012-03-11 Thread Andres Ferrate
Hi All,

We've got a double round of Google Maps API Office Hours on Google+
via hangouts this week.

Google Maps API Office Hours: Europe, US, Africa, and Latin America
March 13 @ 7:00 am PDT
RSVP Here: http://goo.gl/rNWrn
Add this event to your calendar: http://goo.gl/nbxjV

Google Maps API Office Hours: Asia and Australia
March 14 @ 4:00 pm SYD (10:00 pm PDT)
RSVP Here: http://goo.gl/JNFHX
Add this event to your calendar: http://goo.gl/rqEKN

You can add topics and questions you want to discuss to our moderator
site: http://goo.gl/igNDO

We're looking forward to hanging out with you all!

Best,

Andres Ferrate
Google Maps Developer Relations

-- 
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-v3@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: SVG graphics clip / disappear when zooming in Chrome + Safari

2012-03-11 Thread Berry Ratliff
On Mar 10, 12:36 pm, Coen de Jong  wrote:
> Sorry to say this but I don't get what you are saying.. Running out of 
> precision? Increase in 2? SVG will have an overflow? Clipping content?

Precision is not the issue.  Two signed integers (one for X & one for
Y) can represent any pixel position in zoom levels 0 - 23.  SVG must
allocate space for drawing.  If your SVG box is 1000 pixels by 1000
pixels, it requires 1 million pixels which is 4 million bytes (RGBA).

Clipping is also irrelevant.  The SVG box is already clipped at its
edges.  A clipping path is used to define a non-rectangular mask
within the drawing space.  The actual display is limited to drawing
within the clipping path.

The real issue involves poly segments crossing your SVG box.  One or
both of the end points of a poly segment may exceed your SVG box.
But, a piece of the poly segment may be within your SVG box.  You will
have to interpolate the end points of the poly segment to equivalent
end points at the edge of your SVG box.  Otherwise, you will be
attempting to draw beyond the space allocated for drawing.  A little
extra space might be available at the margins of the SVG box but the
amount might be different for different browsers.

Have you considered using the API to draw your polys ?  You could draw
your arrows in an "OverlayView".  You could use CANVAS rather than
SVG.  I believe every common browser with support for SVG also has
support for CANVAS.

-- 
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-v3@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: SVG graphics clip / disappear when zooming in Chrome + Safari

2012-03-11 Thread DiTieM

>
> Sorry. Your SVG overlay must have some coordinates. For example you say, I 
> want to draw a path from 10,10 to 15,20. Now imagine that 10,10 is Sydney 
> and 20,20 is New York. If you are in zoom level 0, you will have 10,10 and 
> 20,20. In level 1, it would be 20,20 for Sydney and 40,40 for New York. In 
> level N, 2^N*(10,10) and 2^N*(20,20). So, how big is you SVG size? is is 
> the size of the "screen" or the size of the "map"? If it is the size of the 
> map, you have a SVG of 2^24 (max zoom) "pixels" by the size of a tile 
> (2^8). Can you imagine that? You have an SVG of 2^32 pixels. Think how 
> things go inside the browser, having to manage all those "big" numbers is 
> very easy to run into overflow.
>

A very easy way to detect this is to draw a thick line and observe. When 
you are making a zoom, the line will become a bit thinner (error of 
rendering in such huge coordinates).  

So, the way to fix this is by clipping. Your SVG need to be always as big 
as the screen, and you need to draw in it what corresponds to the size of 
the screen. Technically this should not happen if the SVG would be well 
designed (you can play with the attribute viewBox, but it wont help much), 
but...

Hope it is more clear now :)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/rm22pQWQQowJ.
To post to this group, send email to google-maps-js-api-v3@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.