[mapguide-internals] Fix for low performance while generating legend

Rock Beans rockbeans at gmail.com
Thu Jul 16 15:29:59 EDT 2009


I would agree with the icons. I think we are on separate topics. I
will try and explain better. It seems when a parent item is unchecked
and a child object is checked by user it submits a lot of information
back and forth from the server that really doesn't do anything on the
map since the parent item is unchecked.Have you noticed this?

Nice work on the patch though, long time we have waited for something
to be done on the legend. I personally can't understand why the legend
HAS to be there for the map to work. Even when you say no legend it
just makes the frame 0px but it is still there scripting away the
resources.

//The Rock




On Wed, Jul 15, 2009 at 8:29 PM, Arthur Liu<arthur.liu at autodesk.com> wrote:
> I am afraid not. If a parent folder is unchecked but expanded, the sub-items' legend image should displayed in the legend, right?
>
> Regards,
> Arthur
>
> -----Original Message-----
> From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Rock Beans
> Sent: Thursday, July 16, 2009 1:37 AM
> To: MapGuide Internals Mail List
> Subject: Re: [mapguide-internals] Fix for low performance while generating legend
>
> Does this also fix the redundant requests when parent item is unchecked?
>
> On Tue, Jul 14, 2009 at 10:25 PM, Arthur Liu<arthur.liu at autodesk.com> wrote:
>> Hi all,
>>
>>
>>
>> I've fixed the issue for the low performance while generating legend(Ticket #1023<https://trac.osgeo.org/mapguide/ticket/1023>). Would you please review it at https://trac.osgeo.org/mapguide/attachment/ticket/1023/Dynamic%20Legend.patch? Thanks.
>>
>>
>>
>> Some comments:
>>
>> The original implementation is generate all legend images for layers in the legend after the map loaded at one time. This will bring some performance issue(too many http requests).
>> To resolve this problem, we could generate the legend on demand. Generate a legend picture only when
>> 1. The corresponding layer is visible in current scale.
>> 2. The legend node is visible in the legend tree. (If any parent node of a legend node is collapsed, then the legend node is invisible).
>>
>> I added a new property " iconWasRequested" for LayerItem and ScaleRangeItem (used for organize theme) in legend.js.  This is a flag to mark whether the legend image has been requested or not. The default value is false.  If the item displayed in the legend, the value will be set to true.  If the  item's legend image changed but the item is in a collapsed item, then the value will be set back to false, the HTTP request to generate the legend image will be sent out while the parent node expanded.
>>
>> Arthur Liu
>> Software Development Engineer,
>> ACRD AEC IM,
>> Autodesk(r)
>> Office: 86-21-38664317
>> Mobile: 86-138-1658-3400
>> Address: No 399, Pudian Road,  Pudong New District,
>> Shanghai, 200122 China
>>
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>


More information about the mapguide-internals mailing list