[Cartoweb-users] geostat plugin config

Damien Corpataux damien.corpataux at camptocamp.com
Tue Apr 3 04:32:35 EDT 2007


Hello Mathieu,

I think you can do what you want, but it's not in the geostat.ini.
You'll have to tweak the geostat template files:

* in order to activate chropleth map by default, try to modify
templates/switch.tpl, replace the html with the following:
<input type="checkbox"
       name="{$geostatStatusName}" id="{$geostatStatusName}"
       onclick="CartoWeb.trigger('Geostat.UpdateMap', 'doSubmit()')"
       checked="checked" />
<label for="{$geostatStatusName}">{t}Display geostatistics{/t}</label>

* remove the configure dataset and representation by modifying
templates/geostat.tpl:
   - you should remove the div containing the followinf smarty
variables: {$geostat_data_source} and {$geostat_choropleth_dataset}
   - after that the file should look like:
<div id="geostatGUI">

{$geostat_switch}

<hr />

{$geostat_data_source}

<hr />

<input type="hidden"
       name="geostatShownElementsIdCsv"
       id="geostatShownElementsIdCsv"
       value="{$geostat_shownElementsIdsCsv}" />

{literal}
<script type="text/javascript">
    function toggleGeostatPane(elementId) {
        if ($(elementId) == null) return;

        // Toggles element (show/hide)
        Element.toggle(elementId);

        var display = $(elementId).style.display;
        if (display == '') display = 'block';
       
        // Change the arrow img
        var imgPath = {/literal}'{r type=gfx plugin=geostat}{/r}'{literal};
        if (display == 'none') $(elementId + '_img').src = imgPath +
'arrow_closed.gif';
        else $(elementId + '_img').src = imgPath + 'arrow_opened.gif';
       
        // Writes the display state in the hidden field
        $(elementId + '_display').value = display;
    }
</script>
{/literal}

</div>

It should work this way....

Regards,
Damien


Mathieu Despont wrote:
> Hello
>
> I'm trying to configure the geostat plugin.
> In the geostat exemple (demoGeostat), the user has to clic on the
> "active choropleth" checkbox to display the map.
>
> How can i configure the plugin to have direct my choroplet map
> activated ??
>
> And how can i remove the "configure dataset" and "configure
> representation" forms ??
>
> Is it in geostat.ini file ??
> Where can i find exactly how to configure this file ??  which are
> possible config values ??
>
> in advance, thanks for your response.
>
> Regards,
>
> Mathieu
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users


-- 
Camptocamp SA
Damien Corpataux
PSE A
CH-1015 Lausanne
+41 21 619 10 22 (Direct)
+41 21 619 10 10 (Centrale)
+41 21 619 10 00 (Fax)
P Please consider the environment
Do you really need to print this email?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070403/258abeaf/attachment.html


More information about the Cartoweb-users mailing list