Hi Pamela,

Thank you for the ProgressBarControl!

I'm setting it up to track the progress of markers as they are
rendered on the map.

Unfortunately, I've got the progressbar displaying only after all of
the markers are rendered. So, there is no progressbar, the markers are
drawn, and then the progressbar displays showing that everything was
rendered.

In the example enclosed in the folder, he uses the setTimeout method
in order to get the browser to update the screen and show changes in
the progressbar. I tried it, but I couldn't figure it out. I noticed
that the example uses GMarkers. Is there an all-Flex marker example?

In the documentation, it mentions the remove method, which I didn't
find with code hinting. Flex wouldn't let me use remove.


Please find below my code. The code places markers and the progressbar
shows after all of the markers are rendered. What do I need to add in
order to get the progressbar to show "progress"?




public function pointsBuilder():void {

var progressMX:ProgressbarMapControlMX = new ProgressbarMapControlMX;
        progressMX.x = 200;
        progressMX.y = 200;
        progressMX.width = 150;
        progressMX.height = 100;
        addChild(progressMX);

        markerBoss = new MarkerManager(map, {maxZoom: 16});

        var myArrayLength:uint = myData.length;
        progressMX.start(myArrayLength);

        var i:int;

        for  (i=0; i < myArrayLength; i++) {
        progressMX.updateLoader(1);
        myMarkers = new Marker(new LatLng(myData[i].latitude, myData
[i].longitude),
        new MarkerOptions({
                strokeStyle: new StrokeStyle({color: 0x000000}),
                fillStyle: new FillStyle({color: 0x223344, alpha: 0.8}),
                radius: 12,
                hasShadow: true
                          })

                           );

                markerBoss.addMarker(myMarkers, 16, 16);

                         }

                markerBoss.refresh();


                }


Also, what's the difference between ProgressbarMapControl.as and
ProgressbarMapControlMX.as?



If anyone has any suggestions, please let me know.
Thank you.

-Laxmidi





On Sep 1, 9:38 am, "pamela (Google Employee)" <[email protected]>
wrote:
> Hi Laxmidi-
>
> Ok. I guess I would have expected faster performance with the MarkerManager.
>
> I've just uploaded the ProgressBarControl from Tony, try it 
> out:http://groups.google.com/group/google-maps-api-for-flash/web/GoogleMa...
>
> - pamela
>
>
>
> On Tue, Sep 1, 2009 at 11:19 PM, laxmidi1994<[email protected]> wrote:
>
> > Hi Pamela,
>
> > Thank you for your message.
>
> > 1) I'm placing a lot of markers-- from a hundred (which runs okay) to
> > several thousand (which crawls or crashes). I know that's a lot of
> > markers. Obviously, I could reduce the number of markers placed on the
> > map, but that wouldn't be a good solution in my case.
>
> > 2) I am using the markerManager, so that only the markers in the
> > viewport are rendered.
>
> > 3) I'm very interested in the ProgressBarControl that you mentioned.
>
> > Keep up the good work.
>
> > Thank you!
>
> > -Laxmidi
>
> > On Sep 1, 1:48 am, "pamela (Google Employee)" <[email protected]>
> > wrote:
> >> Hi Laxmidi-
>
> >> How many markers are you displaying? Tony Leonard, from this group,
> >> says that he ported the ProgressBarControl from JS to AS3, and that
> >> would be pretty much what you described wanting. I've pinged him to
> >> see if he can share that code with the group.
>
> >> If you're displaying many markers, you might also want to use
> >> MarkerManager. It will load all markers into memory, and then only
> >> render the markers in the viewport - so the rendering should be
> >> faster.
>
> >> - pamela
>
> >> On Sun, Aug 30, 2009 at 9:07 AM, laxmidi1994<[email protected]> 
> >> wrote:
>
> >> > I have a lot of markers and I'm trying to improve performance.
>
> >> > I use mySQL and php to return latitude and longitude coordinates. I
> >> > then iterate over the result to make the markers. I use the
> >> > markerManager class.
>
> >> >                                                        for  (i=0; i <
> >> > myData.length; i++) {
> >> >                                                        myMarkers = new 
> >> > Marker(new LatLng(myData[i].latitude,
> >> >                                                        myData
> >> > [i].longitude), new MarkerOptions({
> >> >                                                        icon: new myIcon, 
> >> > iconOffset: new Point
> >> > (2,2), iconAlignment:1,  hasShadow:true
> >> >                                                        }));
> >> >                                                        
> >> > markerBoss.addMarker(myMarkers, 15, 15);
> >> >                                                        }
>
> >> > Is there a way to create LatLng's or markers directly in php? Would
> >> > this be faster?
>
> >> > If there isn't a way to speed up creating the markers is there a way
> >> > to show each marker as it is rendered? Presently, all of the markers
> >> > are calculated and then shown at one time. If the markers were shown
> >> > as they were built it would be more interesting for the user than
> >> > looking at a spinning clock.
>
> >> > Looking forward to your suggestions. Thank you!
>
> >> > -Laxmidi
--~--~---------~--~----~------------~-------~--~----~
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