[Cartoweb-users] out of scale icon
oliver.christen
oliver.christen at camptocamp.com
Fri Feb 3 11:17:41 EST 2006
There is a possibility,
add a new metadata and override the layers.tpl template
where you see "{capture name=icon}", thats the piece of code acting for the
out-of-scale icon.
you simply get the metadata parameter you specified in the layers.ini and
add a check in the
{if ...
to accede a user made metadata, retrieve it with
$element.layerMeta.the_name_of_the_metadata
See my tutorial there:
http://www.cartoweb.org/cwiki/HowToCreateALayerTree near the end, look for
"The .metadata parameter".
Regards,
Oliver
> Hello,
>
> Valerio Noti wrote:
>> is it possible to hide (for some layers) the out-of-scale icon on themes
>> list and so display the normal icon even if the layer is out of scale?
>
> No, that's not possible.
>
>> I'm a little confused about the use of metadata.minscale and maxscale
>> parameters in layers.ini:
>>
>> If I set in mapfile:
>>
>> maxscale 5000
>> minscale 50
>>
>> and in layers.ini
>>
>> ..metadata.maxscale = 100000
>> ..metadata.minscale = 10
>>
>> it seems that these last parameters have no effect and I get the
>> out-of-scale icon that links to 5000 scale.
>
> First, in layers.ini metadata, the correct keywords are 'minScale' and
> 'maxScale' (note the capital S => config parameters are case-sensitive!).
>
> I would add that you cannot use metadata.maxScale (resp.
> metadata.minScale) for simple layers (ie. matching an effective mapfile
> layer). In that case, simply use the MAXSCALE (resp. MINSCALE) mapfile
> attribute.
> See http://mapserver.gis.umn.edu/docs/reference/mapfile/layer > MAXSCALE
>
> The metadata mechanism is intended only for layerGroups (they are not
> described in the mapfile).
>
> AS
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
More information about the Cartoweb-users
mailing list