Thanks.

The createPolyline function actually returns an IPolyline class. So
you could try this:
var directionsLine:IPolyline = dir.createPolyline();

Let me know if that fixes your problem.

Jonathan
Scribblemaps.com


On Dec 16, 5:12 pm, KC <[email protected]> wrote:
> Hi Jonathan -
>
> My first thought was to add the polyline with something like this:
>
> var directionsLine:Polyline = dir.createPolyline();
>
> So that I could then target that instance to remove the overlay with
> something like removeOverlay(directionsLine);
>
> But it won't even compile.  I get this error:
>
> 1118: Implicit coercion of a value with static type
> com.google.maps.interfaces:IPolyline to a possibly unrelated type
> com.google.maps.overlays:Polyline.
>
> Any help you can give me would be much appreciated.  By the way, I
> love scribblemaps.com.  Coool idea, Jonathan.
>
> KC
>
> On Dec 16, 5:07 pm, Jonathan Wagner <[email protected]> wrote:
>
>
>
> > What is the error your getting?
>
> > Jonathan
> > Scribblemaps.com
>
> > On Dec 15, 4:58 pm, KC <[email protected]> wrote:
>
> > > Hi -
>
> > > I'm hoping this is relatively easy and I'm just having a mental block
> > > day.  I'd like to be able to remove the polyline created when someone
> > > requests directions to a location.  I don't want to simply remove all
> > > overlays because there could potentially be a lot of points on the map
> > > to add back in.  I'd rather just remove the line created.
>
> > > I've tried setting something like: var directionsLine:Polyline =
> > > dir.createPolyline(); then adding it via addOverlay, and trying to
> > > then remove it later.  But I keep getting coercion errors.
>
> > > Any thoughts from the group would be very much appreciated!  Thanks,
>
> > > KC

--

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