[ka-Map-users] Can the legend be dynamic?

Paul Spencer pspencer at dmsolutions.ca
Mon Aug 8 13:25:59 EDT 2005


Hi Enri,

thanks for this.  This change will certainly work.  However, I did
actually intend it to be MAP_INITIALIZED because the code in here should
only be run when switching to a new map file because it destroys the DOM
hierarchy of the entire legend rather than just swapping the image
source.  Looking at the code, a more elegant solution is likely
available and I will probably do it later this afternoon.

Cheers

Paul

enri wrote:
> Paul,
> 
> I find the problem in kaLegend.js ->  function kaLegend_update(eventID), where 
> 
> "if (eventID == KAMAP_MAP_INITIALIZED)"
> 
> should be 
> "if (eventID == KAMAP_SCALE_CHANGED)"
> ¡¡¡¡
> Enri
> 
> ======= 2005-08-05 19:50:12 you wrote£º=======
> 
> 
>>Hi,
>>
>>the legend *should* be dynamic already.  When you change scales, it
>>should refresh the image associated with each 'group' of layers.  The
>>image is generated using mapscript's drawLegend function so whatever
>>gets generated is beyond ka-Map's direct control.
>>
>>It is possible that there is a bug in ka-Map interferring with this
>>right now.  I will try to check it.
>>
>>Cheers
>>
>>Paul
>>
>>enri wrote:
>>
>>>Ka-map is so impressive. It works well for me, but there's a problem, how can it change the legend dynamicly according to the different scales? Because I have many layers which are set with MAXSCALE and MINSCALE.
>>>
>>>
>>>Thank you very much.
>>>
>>>+--------------------------------------+
>>>| ZHOU, Xu                             |
>>>| Division of Information Service      | 
>>>| National Geomatics Center of China   |
>>>| Tel:+86-10-68415131                  |
>>>| Fax:+86-10-68424101                  |
>>>+--------------------------------------+
>>>
>>>
>>>_______________________________________________
>>>ka-Map-users mailing list
>>>ka-Map-users at lists.maptools.org
>>>http://lists.maptools.org/mailman/listinfo/ka-map-users
>>>
>>
>>-- 
>>+-----------------------------------------------------------------+
>>|Paul Spencer                           pspencer at dmsolutions.ca   |
>>+-----------------------------------------------------------------+
>>|Applications & Software Development                              |
>>|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
>>+-----------------------------------------------------------------+
>>
> 
> 
> = = = = = = = = = = = = = = = = = = = =
> 
> 
> 
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
> 

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the ka-Map-users mailing list