1

Re: Distribution map

Hi,
I'm having problem building a distribution map using client_helpers/prebuilt_forms/distribution_map_1.php.

<?php
echo iform_distribution_map_1::get_form(array('taxon_list_id'=>'5', 
                                                'show_all_species'=>'true',
                                                'wms_feature_type'=>'indicia:detail_occurrences',
                                                'map_width'=>'500','map_height'=>'500'
)); ?>

But this gives me just a web page with an emtpy 500x500 px white area.

The geoserver should work, since I can visualize the data from detail_occurrences via openlayers by hand.

Is there somewhere an example how to use this? A complete minimal page would be nice, since my php knowledge is quite limited ;)

Regards

Daniel

2

Re: Distribution map

Ok, I managed it myself. Here is an example (perhaps for the wiki)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
        <title>Occurence Map</title>
        <link rel="stylesheet" href="demo.css" type="text/css" media="screen"/>
        <link rel="stylesheet" href="../../media/css/default_site.css" type="text/css" media="screen"/>
        <?php
        include '../../client_helpers/data_entry_helper.php';
        require 'data_entry_config.php';
        require '../../client_helpers/prebuilt_forms/distribution_map_1.php';
        
        echo data_entry_helper::dump_header(); ?>
    </head>
    <body>
        <div id="wrap">
            <h1>Occurence Map</h1>
            <?php
            echo iform_distribution_map_1::get_form(array(
                'website_id' => $config['website_id'],
                'taxon_list_id' => '5',
                'map_centroid_lat' => '54',
                'map_centroid_long' => '13',
                'map_zoom' => '8',
                'show_all_species' => 'true',
                'wms_feature_type' => 'indicia:detail_occurrences',
                'map_width' => '900',
                'map_height' => '600',
                'preset_layers' => array(
                    'openlayers_wms' => '0',
                    'virtual_earth' => '0',
                    'google_hybrid' => '5',
                    'google_physical' => '0',
                    'google_streets' => '0',
                    'google_satellite' => '8')
            ));
            echo data_entry_helper::dump_javascript();
            ?>
        </div>
    </body>
</html>

3

Re: Distribution map

Many thanks Daniel. I have created a Wiki page here for starters:
http://code.google.com/p/indicia/wiki/distribution_map_1_standalone

Best Wishes

John van Breda
Biodiverse IT