Hey Bradley,

Answers are inline.

On Wed, Apr 21, 2010 at 6:58 AM, Bradley <[email protected]> wrote:

> Hi Luke,
>
> Thanks, that's a great tutorial and really explains the bindings a lot
> better than the Maps Overlays docs.  I read through the docs on Custom
> Overlays prior to posting, but still needed some clarification.  One
> thing I'm noticing is that you're extending MVCObject() instead of
> OverlayView() as the docs suggest.  Can you tell me the reasoning for
> this? And the difference?
>

A OverlayView is essentially a MVCObject with some extra things like the
MapCanvasProjection. For my example I didn't need it so I only extended the
MVCObject.


> Also, I have a couple other questions if you have the time:
>
> 1. In your example, you have the
> RadiusWidget.prototype.center_changed, but I don't actually see
> anywhere that this gets called?  I can only assume that it has to do
> with the bindings but I'm still kind of confused as to how this works
>

All MVC properties that are 'set' automatically fire an event XXX_changed


>
> 2. I'm looking to draw circles that are all relative (in size) to each
> other, no matter where on the map they lie.  This is because the size
> of my circle will represent, for instance, the population of a
> location.  With the current API however it appears that locations
> closer to the equator are smaller because of projection.  Can you
> suggest the best mechanism for having relatively sized circles so that
> their position does not skew their size?
>

The sizes skew because that's how a circle looks on a sphere, you could
instead try creating a DIV with a OverlayView and set a border radius to
create a circle (but this will only work with CSS3 browsers) or you could
create your own SVG object. This is more related to drawing circles in HTML
rather than Google Maps itself so you could do some Google searches for
other suggestions.


> 3. Regarding style, is the _ syntax at the end of some of your methods
> (ie. RadiusWidget.prototype.distanceBetweenPoints_) meant to denote
> "private" methods?
>

That is correct, I find that it helps readability.


>
> Thanks for all of your help, it's much appreciated.
>
> Brad
>
> On Apr 20, 6:15 pm, Luke Mahé <[email protected]> wrote:
> > Hi Bradley,
> >
> > You should be able to do this by using the OverlayView, the Circle
> overlay
> > and some MVC techniques.
> >
> > You can read about the OverlayView in the docs (
> http://code.google.com/apis/maps/documentation/v3/overlays.html#Custo...)
> > and
> > about MVC  techniques in a article that I recently wrote (
> http://code.google.com/apis/maps/articles/mvcfun.html)
> >
> > Hope this helps
> >
> > - Luke
> >
> > <http://code.google.com/apis/maps/articles/mvcfun.html>
> >
> >
> >
> >
> >
> > On Tue, Apr 20, 2010 at 1:55 PM, Bradley <[email protected]>
> wrote:
> > > It should be noted that the intention here is to be able to generate
> > > many circle overlays of different colours each with different sizes
> > > and text, which is why I'd like to avoid an image.
> >
> > > On Apr 20, 4:37 pm, Bradley <[email protected]> wrote:
> > > > I've been exploring V3 for a bit and I noticed the Circle overlay,
> > > > plus the ability to create custom overlays by extending
> > > > google.maps.OverlayView.
> >
> > > > I'm trying to combine these so I can have a circle overlay with some
> > > > custom, dynamically generated text inside.  The examples on custom
> > > > overlays just deal with DOM elements like images, but I'm wondering
> > > > how one might achieve this with maps specific overlays, ie. circles.
> >
> > > > I noticed SVG elements on the map when creating the circle.  Is there
> > > > a way I can just overlay text on top of this?  A point in the right
> > > > direction or any pseudo code is appreciated, I'm actively trying to
> > > > solve this at the moment.
> >
> > > > --
> > > > 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
> > > [email protected].
> > > > To unsubscribe from this group, send email to
> > > [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B
> [email protected]>
> > > .
> > > > For more options, visit this group athttp://
> > > 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
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B
> [email protected]>
> > > .
> > > 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
> [email protected].
> > To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> > For more options, visit this group athttp://
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to