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?
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
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?
3. Regarding style, is the _ syntax at the end of some of your methods
(ie. RadiusWidget.prototype.distanceBetweenPoints_) meant to denote
"private" methods?
Thanks for all of your help, it's much appreciated.
Brad
> 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
>
> On Tue, Apr 20, 2010 at 1:55 PM, Bradley <bradleyrobert...@gmail.com> 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 <bradleyrobert...@gmail.com> 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
> > google-map...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B unsub...@googlegroups.com>
> > .
> > > 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
> > google-map...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B unsub...@googlegroups.com>
> > .
> > 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 google-map...@googlegroups.com.
> To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.