How many points are you working with/ what are you doing with them?
It'd have to be a pretty substantial collection of points for that
loop to cause a significant slow down, are you sure that's the
problem?
If it's enough points for that to be an issue you're probably also
taking delays on networking.

You could possibly create them in php and transfer them via AMF - that
way flash would just be deserializing and slightly more of the work
would be done on the server, its a bit of work if you're not already
using AMF though.

Again, I'd say go through it with a profiler if you've got one,  if
not satify yourself with timers/debugger.

On Jul 13, 3:13 pm, laxmidi1994 <[email protected]> wrote:
> Hi,
>
> Is there a way to return LatLng, Google Maps' format for points, from
> a mySQL database? I'm using Flex 3 and MySQL with Google Maps.
>
> Currently, I select latitudes and longitudes from my mySQL table and
> then iterate over them in Flex in order to make the LatLng for Google
> Maps suing the following function:
>
> public function latLngCreator():void {
>         myLatLngArray = [];
>         var i:uint;
>         var arrayCollectionLength:int = myData.length;
>
>         for  (i=0; i < arrayCollectionLength; i++) {
>             myLatLng = new LatLng(myData[i].latitude,
> myData[i].longitude);
>             myLatLngArray.push(myLatLng);
>              }
>
> Is there a way to skip the above step and select the latitudes and
> longitudes from the table and create the LatLng in PHP? This way I
> wouldn't have to iterate over the result and hopefully it would be
> faster.
>
> I posted this question on Stack Overflow, but I didn't get a reply, so
> I thought that I'd try here.
>
> Any 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