[Chameleon] WMSBrowser question
Paul Spencer
pagameba at gmail.com
Thu Feb 23 07:36:38 EST 2006
Matt, the WMSBrowser doesn't do this. You would need to modify it for
your needs.
Cheers
Paul
On 2/22/06, He, Matt Yubin <mhe at itsc.uah.edu> wrote:
>
> Hi All:
>
> I use WMSBrowser in my Chameleon application to add a layer.
> However, the added layer in map file did not have a "Group" name.
> Does anyone know how to add a Group name to the new layer?
>
> Thanks.
>
> Matt
>
> P.S. Following is the code for adding new layer in WMSBrowser widget.
> // add the layer to the map
> if (is_numeric($szLayer));
> {
> $oWMSDatabase = new WMSDatabase( $_SESSION["gszServerDataPath"] );
> $oServerDataManager = new ServerDataManager( $oWMSDatabase );
> $oWMSLayer = $oServerDataManager->getLayerObj( $szLayer );
> if ($oWMSLayer == null)
> {
> $_SESSION['gErrorManager']->setError(ERR_WARNING,
> "ERROR: could not add layer $szLayer to map!" );
> return false;
>
> }
> $oLayer = ms_newLayerObj( $this->moMapObject->oMap, $oWMSLayer );
>
> // get the current map projection
> $szTempMapProj = $this->moMapObject->oMap->getprojection();
>
> // only set the projection if it's set in the map
> if ( strlen( trim( $szTempMapProj ) ) > 0 )
> {
> // set layer projection
> $oLayer->setprojection( $szTempMapProj );
> }
>
> $_SESSION['gszCurrentState'] = $this->moMapObject->saveState();
> }
>
>
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
>
More information about the Chameleon
mailing list