Hi, TinyGrasshopper,

We have a bug filed for the inability to extend a Polyline created
using the fromEncoded method and we will take a look at it.

For now, maybe you could consider creating a Dictionary
(flash.utils.Dictionary) object to match the instances of your
Polylines to separate instances of classes containing the extended
data fields you want to attach to these polylines.
This is a less efficient way of going about it than extending the
class and adding your extra fields, but this may work nonetheless.
It may also be a lot easier to do than implementing your own
Polyline. :)

Thanks.

Dmitri.

PS#0: As for wrappable stuff, we are keeping that stuff deliberately
obscure.
Developers interested in implementing their own overlays (such as
Polylines) may want to start with the OverlayBase class.
It provides the very basic skeleton for an overlay and also contains
the implementation for the wrappables (so you won't have to care about
them).
In general, we discourage people from implementing interfaces from
scratch (specifically because of the wrappables problem) and try to
provide base classes instead.

PS#1: hide() and show() methods on Polylines return void, not Boolean.
getLength() must be declared with the default value of
LatLng.EARTH_RADUIS for its signature to be compatible.

On Oct 3, 10:14 am, TinyGrasshopper <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> In the application I'm working on, there is a need to have some extra
> fields on a polyline. Since there's not yet a way to add extra info to
> the base Polyline class, I first thought to do this by extending the
> Polyline class with my own class, however then I ran into the issue of
> not being able to subclass the results of fromEncoded.
>
> So my next attempt was to wrap a polyline object in another object
> which looks like a Polyline but really just hands everything over to
> the polyline it contains. My current problem is that I've come across
> some functions that I need to implement but which aren't documented in
> the API spec (or appear to be wrong). There seems to be issues with
> the following four methods:
>
> - IPolyline.hide()
>         I presume this is something like:
>
>         public function hide():Boolean;
>
>         but that doesn't seem to work.
>
> - IPolyline.isHidden()
>         I got this to work with this declaration:
>
>         public function isHidden():Boolean;
>
> - IPolyline.show()
>         Again, I presume it's something like:
>
>         public function show():Boolean;
>
>         but that doesn't work
>
> - IPolyline.getLength()
>         This seems to be documented incorrectly, the documentation says it
> should be:
>
>         public function getLength(opt_radius:Number):Number;
>
>         but that doesn't work.
>
> Note that when i say "doesn't work" i mean that I get compile errors
> like:
>
> ...\EntityPolyline.as(35): col: 15 Error: Interface method getLength
> in namespace com.google.maps.interfaces:IPolyline is implemented with
> an incompatible signature in class ...:EntityPolyline.
>
>         public class EntityPolyline extends EventDispatcher implements
> IEntityGraphic, IOverlay, IPolyline, IWrappable,
> IWrappableEventDispatcher {
>
> Does anyone know what the correct prototypes for these methods are?
>
> Hehe also, can anyone tell me what IWrappable and
> IWrappableEventDispatcher are about? I dont really understand what the
> documentation means by "cross-domain event dispatching functionality".
>
> Pretty sure my wrapper's not going to work :) but oh well - thought
> i'd at least give it a go before giving up on the whole idea and
> changing my code to have a controller that sits beside a real
> polyline.
>
> Cheers,
> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-api-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to