Dear all,
more and more fun in using (and understanding!) pmapper.
The definition of SESSION variables before calling the map enables to
define various parameters before the map is drawn.
Two examples:
1. Set the extent to a predefined extent different from the one
already saved in SESSION or stored in the ini file (e. g. by calling
different locations from a list):
if (isset($_GET["extent"])) {
$xy = explode(",",$_GET["extent"]);
$_SESSION["GEOEXT"]["minx"] = $xy[0];
$_SESSION["GEOEXT"]["miny"] = $xy[1];
$_SESSION["GEOEXT"]["maxx"] = $xy[2];
$_SESSION["GEOEXT"]["maxy"] = $xy[3];
}
2. Correction of $_SESSION["groups"]
2.1 Will add specific layers to active layers if they are not active
($_GET-variable "groupsadd" => Layerlist)
if (isset($_GET["groupsadd"]) and (isset($_SESSION["groups"]) and
is_array($_SESSION["groups"]))) {
$gr = explode(",",$_GET["groupsadd"]);
foreach ($gr as $value) {
if (isset($value) and !in_array($value,$_SESSION["groups"])) {
array_push($_SESSION["groups"],$value);
}
}
} elseif (isset($_GET["groupsadd"])) {
$_SESSION["groups"] = explode(",",$_GET["groupsadd"]);
}
2.2 Redefine, completely new groups ($_GET-variable "groupsnew" =>
Layerlist)
if (isset($_GET["groupsnew"])) {
$_SESSION["groups"] = explode(",",$_GET["groupsnew"]);
}
My questions:
- These solutions work, but are they the best way to handle this or
are there other functionalities, a more elegant way available?
- Is there a documentation of the SESSION variables and what they mean?
And another question:
- How do I handle which layer could be queried and which not? Is there
even a SESSION variable? Even if I set TEMPLATE "false" in the map
file sometimes I get query results (or freezing/error messages while
pmapper tried to request a wms service)
I work with pmapper 3.2
Regards
Andreas
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users