Thanks Jonathan! That worked as expected. I really appreciate all your help on this!
KC On Dec 16, 2009, at 6:54 PM, Jonathan Wagner <[email protected]> wrote: > You might have to type the directionsLine to PolyLine > > (directionsLine as PolyLine) > or you should be able to do this as well > var directionsLine:Polyline = dir.createPolyline() as Polyline. > > then the .pane parameter will be null if it is not added to an > overlay. > > Jonathan > Scribblemaps.com > > On Dec 16, 5:39 pm, KC <[email protected]> wrote: >> Wow, that was way to easy. Can't believe I didn't try that. Thanks >> for your help. >> >> Hope I can get your assistance on one final question... Now that I >> can >> add it that way, I can't seem to get the targeting correctly set up >> to >> check if there is a Polyline on the map already and remove it if >> there >> is. >> >> Any thoughts on that one? >> Thanks again! >> >> On Dec 16, 5:25 pm, Jonathan Wagner <[email protected]> wrote: >> >> >> >>> 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 > . > > -- 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.
