php-mapscript tile indexing
Kristjan Annus
kristjan at TARKVARASTUUDIO.EE
Tue Jan 25 23:22:32 PST 2005
$layers = $map->getLayersIndexByGroup('IGBP_MOD12Q1');
if ($layers) {
while ($lr = each($layers)) {
$oCurrLayer = $map->getLayer($lr[1]);
$oCurrLayer->set( "status", 1);
this line might be needed if you have done $map->draw() allready
: $oCurrLayer->draw( $image);
}
}
>Hi,
>
>I am able to customize the GMap php-rosa sample app. I have the
>following layer in my .map file, I am using TILEINDEX for 8km and 1km
>resolution and for the top level 50 km I am using tif image. In by JBox
>I used to call this layer by the GROUP " MOD12Q1" and it worked, now in
>the php application how do I call this group? Is there similar method
>call like getlayerbyname() for LAYER GROUP?
>
> $poLayer = $gpoMap->getlayerbyname("IGBP_MOD12Q1");
> $poLayer->set("status", 1);
>
>Returns
>Warning: getLayerByName failed for : IGBP_MOD12Q1 in
>f:\Inetpub\wwwroot\gmap\htdocs\gmap75.inc.php on line 116
>
>Any suggestion would be highly appreciated Thanks!
>Giri
>
>Here is my layer snippet from the .map file
>
>LAYER
> NAME IGBP_50k
> GROUP IGBP_MOD12Q1
> TYPE RASTER
> DATA LL_SDS01GR50.tif
> STATUS ON
> MINSCALE 1490000
> MAXSCALE 190000000
> #MAXSCALE 10000
> PROJECTION
> "proj=longlat"
> "ellps=GRS80"
> "no_defs"
> END
>END
>LAYER
> NAME IGBP_8K
> GROUP IGBP_MOD12Q1
> TYPE RASTER
> STATUS ON
> TILEINDEX "modis_8km"
> TILEITEM "Location"
> MINSCALE 29000000
> MAXSCALE 150000000
> PROJECTION
> "proj=longlat"
> "ellps=GRS80"
> "no_defs"
> "proj=eqc"
> END
>
>END
>LAYER
> NAME IGBP_1K
> GROUP IGBP_MOD12Q1
> TYPE RASTER
> STATUS ON
> TILEINDEX "modis_1km"
> TILEITEM "Location"
> #MINSCALE 8000000
> MAXSCALE 30000000
> PROJECTION
> "proj=longlat"
> "ellps=GRS80"
> "no_defs"
> "proj=eqc"
> END
>
>END
>
>Giri
>
>
More information about the MapServer-users
mailing list