|
|
|
Nolte, Tim
|
I have figured out how to give properly formatted names to groups and
layers. The problem I run into now is I have a few layers that I am classifying. These classified layers are showing the crude CLASS -> NAME (e.g. 'on_air_evdo') but I want to have Fusion show a properly formatted name (e.g. 'EVDO On-Air'). Thanks. - Tim ---- Timothy J Nolte - [hidden email] Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
|
Nolte, Tim
|
OK, so I decided to do a little digging in the MapServer code. I'd like
to propose the following code change in the LoadMap.php: //create classes and slot them into the scale breaks for ($j=0; $j<$layer->numclasses; $j++) { $oClass = $layer->getClass($j); $classObj = NULL; // Use formatted legend label as defined by CLASS->TITLE $classObj->legendLabel = $oClass->title != '' ? $oClass->title : $oClass->name; //$classObj->legendLabel = $oClass->name; $classObj->filter = $oClass->getExpression(); $classMin = $oClass->minscale == -1 ? $layerMin : max($oClass->minscale, $layerMin); $classMax = $oClass->maxscale == -1 ? $layerMax : min($oClass->maxscale, $layerMax); $classObj->minScale = $classMin; $classObj->maxScale = $classMax; $classObj->index = $j; for ($k=0; $k<count($aScaleRanges); $k++) { if ($classMin < $aScaleRanges[$k]->maxScale && $classMax > $aScaleRanges[$k]->minScale) { array_push($aScaleRanges[$k]->styles, $classObj); } } } This block starts around line 306. My code change looks for a CLASS->TITLE and uses that and if not found falls back on the CLASS->NAME. I've tested and it works perfectly! I would really like to not have to manually maintain my custom code here. Thanks! - Tim ---- Timothy J Nolte - [hidden email] Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Nolte, Tim Sent: Tuesday, September 08, 2009 4:14 PM To: [hidden email] Subject: [fusion-users] Proper Class Names in MapServer Mapfile I have figured out how to give properly formatted names to groups and layers. The problem I run into now is I have a few layers that I am classifying. These classified layers are showing the crude CLASS -> NAME (e.g. 'on_air_evdo') but I want to have Fusion show a properly formatted name (e.g. 'EVDO On-Air'). Thanks. - Tim ---- Timothy J Nolte - [hidden email] Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
|
Paul Spencer-2
|
Tim, do you know in which mapserver version $class->title got added to
mapscript? What will happen in older mapserver installs, will it return an empty string? Paul On 2009-09-08, at 4:45 PM, Nolte, Tim wrote: > OK, so I decided to do a little digging in the MapServer code. I'd > like > to propose the following code change in the LoadMap.php: > > //create classes and slot them into the scale breaks > for ($j=0; $j<$layer->numclasses; $j++) { > $oClass = $layer->getClass($j); > $classObj = NULL; > // Use formatted legend label as defined by CLASS->TITLE > $classObj->legendLabel = $oClass->title != '' ? > $oClass->title : $oClass->name; > //$classObj->legendLabel = $oClass->name; > $classObj->filter = $oClass->getExpression(); > $classMin = $oClass->minscale == -1 ? $layerMin : > max($oClass->minscale, $layerMin); > $classMax = $oClass->maxscale == -1 ? $layerMax : > min($oClass->maxscale, $layerMax); > $classObj->minScale = $classMin; > $classObj->maxScale = $classMax; > $classObj->index = $j; > for ($k=0; $k<count($aScaleRanges); $k++) { > if ($classMin < $aScaleRanges[$k]->maxScale && > $classMax > $aScaleRanges[$k]->minScale) { > array_push($aScaleRanges[$k]->styles, $classObj); > } > } > } > > This block starts around line 306. My code change looks for a > CLASS->TITLE and uses that and if not found falls back on the > CLASS->NAME. I've tested and it works perfectly! I would really like > to > not have to manually maintain my custom code here. Thanks! > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Nolte, Tim > Sent: Tuesday, September 08, 2009 4:14 PM > To: [hidden email] > Subject: [fusion-users] Proper Class Names in MapServer Mapfile > > I have figured out how to give properly formatted names to groups and > layers. The problem I run into now is I have a few layers that I am > classifying. These classified layers are showing the crude CLASS -> > NAME > (e.g. 'on_air_evdo') but I want to have Fusion show a properly > formatted > name (e.g. 'EVDO On-Air'). Thanks. > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users > > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users __________________________________________ Paul Spencer Chief Technology Officer DM Solutions Group Inc http://research.dmsolutions.ca/ _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
|
Nolte, Tim
|
Daniel,
Do you have further insight into Paul's question? - Tim ---- Timothy J Nolte - [hidden email] Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com -----Original Message----- From: Paul Spencer [mailto:[hidden email]] Sent: Tuesday, September 08, 2009 4:48 PM To: Nolte, Tim Cc: [hidden email] Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile Tim, do you know in which mapserver version $class->title got added to mapscript? What will happen in older mapserver installs, will it return an empty string? Paul On 2009-09-08, at 4:45 PM, Nolte, Tim wrote: > OK, so I decided to do a little digging in the MapServer code. I'd > like > to propose the following code change in the LoadMap.php: > > //create classes and slot them into the scale breaks > for ($j=0; $j<$layer->numclasses; $j++) { > $oClass = $layer->getClass($j); > $classObj = NULL; > // Use formatted legend label as defined by CLASS->TITLE > $classObj->legendLabel = $oClass->title != '' ? > $oClass->title : $oClass->name; > //$classObj->legendLabel = $oClass->name; > $classObj->filter = $oClass->getExpression(); > $classMin = $oClass->minscale == -1 ? $layerMin : > max($oClass->minscale, $layerMin); > $classMax = $oClass->maxscale == -1 ? $layerMax : > min($oClass->maxscale, $layerMax); > $classObj->minScale = $classMin; > $classObj->maxScale = $classMax; > $classObj->index = $j; > for ($k=0; $k<count($aScaleRanges); $k++) { > if ($classMin < $aScaleRanges[$k]->maxScale && > $classMax > $aScaleRanges[$k]->minScale) { > array_push($aScaleRanges[$k]->styles, $classObj); > } > } > } > > This block starts around line 306. My code change looks for a > CLASS->TITLE and uses that and if not found falls back on the > CLASS->NAME. I've tested and it works perfectly! I would really like > to > not have to manually maintain my custom code here. Thanks! > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Nolte, Tim > Sent: Tuesday, September 08, 2009 4:14 PM > To: [hidden email] > Subject: [fusion-users] Proper Class Names in MapServer Mapfile > > I have figured out how to give properly formatted names to groups and > layers. The problem I run into now is I have a few layers that I am > classifying. These classified layers are showing the crude CLASS -> > NAME > (e.g. 'on_air_evdo') but I want to have Fusion show a properly > formatted > name (e.g. 'EVDO On-Air'). Thanks. > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users > > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users __________________________________________ Paul Spencer Chief Technology Officer DM Solutions Group Inc http://research.dmsolutions.ca/ _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
|
Julien-Samuel Lacroix
|
Hi,
It seems to have been added in MapServer 3.6. I'm not sure if Fusion with a version that old. http://trac.osgeo.org/mapserver/changeset/1389 Julien Nolte, Tim wrote: > Daniel, > > Do you have further insight into Paul's question? > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > > -----Original Message----- > From: Paul Spencer [mailto:[hidden email]] > Sent: Tuesday, September 08, 2009 4:48 PM > To: Nolte, Tim > Cc: [hidden email] > Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile > > Tim, do you know in which mapserver version $class->title got added to > mapscript? What will happen in older mapserver installs, will it > return an empty string? > > Paul > > On 2009-09-08, at 4:45 PM, Nolte, Tim wrote: > >> OK, so I decided to do a little digging in the MapServer code. I'd >> like >> to propose the following code change in the LoadMap.php: >> >> //create classes and slot them into the scale breaks >> for ($j=0; $j<$layer->numclasses; $j++) { >> $oClass = $layer->getClass($j); >> $classObj = NULL; >> // Use formatted legend label as defined by CLASS->TITLE >> $classObj->legendLabel = $oClass->title != '' ? >> $oClass->title : $oClass->name; >> //$classObj->legendLabel = $oClass->name; >> $classObj->filter = $oClass->getExpression(); >> $classMin = $oClass->minscale == -1 ? $layerMin : >> max($oClass->minscale, $layerMin); >> $classMax = $oClass->maxscale == -1 ? $layerMax : >> min($oClass->maxscale, $layerMax); >> $classObj->minScale = $classMin; >> $classObj->maxScale = $classMax; >> $classObj->index = $j; >> for ($k=0; $k<count($aScaleRanges); $k++) { >> if ($classMin < $aScaleRanges[$k]->maxScale && >> $classMax > $aScaleRanges[$k]->minScale) { >> array_push($aScaleRanges[$k]->styles, $classObj); >> } >> } >> } >> >> This block starts around line 306. My code change looks for a >> CLASS->TITLE and uses that and if not found falls back on the >> CLASS->NAME. I've tested and it works perfectly! I would really like >> to >> not have to manually maintain my custom code here. Thanks! >> >> - Tim >> >> ---- >> Timothy J Nolte - [hidden email] >> Network Planning Engineer >> >> iPCS Wireless, Inc. >> 4717 Broadmoor Ave, Suite G >> Kentwood, MI 49512 >> >> Office: 616-656-5163 >> PCS: 616-706-2438 >> Fax: 616-554-6484 >> Web: www.ipcswirelessinc.com >> -----Original Message----- >> From: [hidden email] >> [mailto:[hidden email]] On Behalf Of Nolte, Tim >> Sent: Tuesday, September 08, 2009 4:14 PM >> To: [hidden email] >> Subject: [fusion-users] Proper Class Names in MapServer Mapfile >> >> I have figured out how to give properly formatted names to groups and >> layers. The problem I run into now is I have a few layers that I am >> classifying. These classified layers are showing the crude CLASS -> >> NAME >> (e.g. 'on_air_evdo') but I want to have Fusion show a properly >> formatted >> name (e.g. 'EVDO On-Air'). Thanks. >> >> - Tim >> >> ---- >> Timothy J Nolte - [hidden email] >> Network Planning Engineer >> >> iPCS Wireless, Inc. >> 4717 Broadmoor Ave, Suite G >> Kentwood, MI 49512 >> >> Office: 616-656-5163 >> PCS: 616-706-2438 >> Fax: 616-554-6484 >> Web: www.ipcswirelessinc.com >> _______________________________________________ >> fusion-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/fusion-users >> >> _______________________________________________ >> fusion-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/fusion-users > > > __________________________________________ > > Paul Spencer > Chief Technology Officer > DM Solutions Group Inc > http://research.dmsolutions.ca/ > > > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users > -- Julien-Samuel Lacroix Mapgears http://www.mapgears.com/ _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
|
Nolte, Tim
|
It would seem to me that if $class->title was add that long ago there
should be no question of whether this can be incorporated into Fusion. I wouldn't think people would be using Fusion with anything older then 4.x MapServer/MapScript. - Tim ---- Timothy J Nolte - [hidden email] Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com -----Original Message----- From: Julien-Samuel Lacroix [mailto:[hidden email]] Sent: Wednesday, September 09, 2009 9:31 AM To: Nolte, Tim Cc: [hidden email]; [hidden email] Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile Hi, It seems to have been added in MapServer 3.6. I'm not sure if Fusion with a version that old. http://trac.osgeo.org/mapserver/changeset/1389 Julien Nolte, Tim wrote: > Daniel, > > Do you have further insight into Paul's question? > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > > -----Original Message----- > From: Paul Spencer [mailto:[hidden email]] > Sent: Tuesday, September 08, 2009 4:48 PM > To: Nolte, Tim > Cc: [hidden email] > Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile > > Tim, do you know in which mapserver version $class->title got added to > mapscript? What will happen in older mapserver installs, will it > return an empty string? > > Paul > > On 2009-09-08, at 4:45 PM, Nolte, Tim wrote: > >> OK, so I decided to do a little digging in the MapServer code. I'd >> like >> to propose the following code change in the LoadMap.php: >> >> //create classes and slot them into the scale breaks >> for ($j=0; $j<$layer->numclasses; $j++) { >> $oClass = $layer->getClass($j); >> $classObj = NULL; >> // Use formatted legend label as defined by CLASS->TITLE >> $classObj->legendLabel = $oClass->title != '' ? >> $oClass->title : $oClass->name; >> //$classObj->legendLabel = $oClass->name; >> $classObj->filter = $oClass->getExpression(); >> $classMin = $oClass->minscale == -1 ? $layerMin : >> max($oClass->minscale, $layerMin); >> $classMax = $oClass->maxscale == -1 ? $layerMax : >> min($oClass->maxscale, $layerMax); >> $classObj->minScale = $classMin; >> $classObj->maxScale = $classMax; >> $classObj->index = $j; >> for ($k=0; $k<count($aScaleRanges); $k++) { >> if ($classMin < $aScaleRanges[$k]->maxScale && >> $classMax > $aScaleRanges[$k]->minScale) { >> array_push($aScaleRanges[$k]->styles, $classObj); >> } >> } >> } >> >> This block starts around line 306. My code change looks for a >> CLASS->TITLE and uses that and if not found falls back on the >> CLASS->NAME. I've tested and it works perfectly! I would really like >> to >> not have to manually maintain my custom code here. Thanks! >> >> - Tim >> >> ---- >> Timothy J Nolte - [hidden email] >> Network Planning Engineer >> >> iPCS Wireless, Inc. >> 4717 Broadmoor Ave, Suite G >> Kentwood, MI 49512 >> >> Office: 616-656-5163 >> PCS: 616-706-2438 >> Fax: 616-554-6484 >> Web: www.ipcswirelessinc.com >> -----Original Message----- >> From: [hidden email] >> [mailto:[hidden email]] On Behalf Of Nolte, Tim >> Sent: Tuesday, September 08, 2009 4:14 PM >> To: [hidden email] >> Subject: [fusion-users] Proper Class Names in MapServer Mapfile >> >> I have figured out how to give properly formatted names to groups and >> layers. The problem I run into now is I have a few layers that I am >> classifying. These classified layers are showing the crude CLASS -> >> NAME >> (e.g. 'on_air_evdo') but I want to have Fusion show a properly >> formatted >> name (e.g. 'EVDO On-Air'). Thanks. >> >> - Tim >> >> ---- >> Timothy J Nolte - [hidden email] >> Network Planning Engineer >> >> iPCS Wireless, Inc. >> 4717 Broadmoor Ave, Suite G >> Kentwood, MI 49512 >> >> Office: 616-656-5163 >> PCS: 616-706-2438 >> Fax: 616-554-6484 >> Web: www.ipcswirelessinc.com >> _______________________________________________ >> fusion-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/fusion-users >> >> _______________________________________________ >> fusion-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/fusion-users > > > __________________________________________ > > Paul Spencer > Chief Technology Officer > DM Solutions Group Inc > http://research.dmsolutions.ca/ > > > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users > -- Julien-Samuel Lacroix Mapgears http://www.mapgears.com/ _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
|
Nolte, Tim
|
Does anyone object if I just build a ticket in Trac for this? I'm
proposing this as a change to the 2.0 branch. - Tim ---- Timothy J Nolte - [hidden email] Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Nolte, Tim Sent: Wednesday, September 09, 2009 9:40 AM To: Julien-Samuel Lacroix Cc: [hidden email]; [hidden email] Subject: RE: [fusion-users] Proper Class Names in MapServer Mapfile It would seem to me that if $class->title was add that long ago there should be no question of whether this can be incorporated into Fusion. I wouldn't think people would be using Fusion with anything older then 4.x MapServer/MapScript. - Tim ---- Timothy J Nolte - [hidden email] Network Planning Engineer iPCS Wireless, Inc. 4717 Broadmoor Ave, Suite G Kentwood, MI 49512 Office: 616-656-5163 PCS: 616-706-2438 Fax: 616-554-6484 Web: www.ipcswirelessinc.com -----Original Message----- From: Julien-Samuel Lacroix [mailto:[hidden email]] Sent: Wednesday, September 09, 2009 9:31 AM To: Nolte, Tim Cc: [hidden email]; [hidden email] Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile Hi, It seems to have been added in MapServer 3.6. I'm not sure if Fusion with a version that old. http://trac.osgeo.org/mapserver/changeset/1389 Julien Nolte, Tim wrote: > Daniel, > > Do you have further insight into Paul's question? > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > > -----Original Message----- > From: Paul Spencer [mailto:[hidden email]] > Sent: Tuesday, September 08, 2009 4:48 PM > To: Nolte, Tim > Cc: [hidden email] > Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile > > Tim, do you know in which mapserver version $class->title got added to > mapscript? What will happen in older mapserver installs, will it > return an empty string? > > Paul > > On 2009-09-08, at 4:45 PM, Nolte, Tim wrote: > >> OK, so I decided to do a little digging in the MapServer code. I'd >> like >> to propose the following code change in the LoadMap.php: >> >> //create classes and slot them into the scale breaks >> for ($j=0; $j<$layer->numclasses; $j++) { >> $oClass = $layer->getClass($j); >> $classObj = NULL; >> // Use formatted legend label as defined by CLASS->TITLE >> $classObj->legendLabel = $oClass->title != '' ? >> $oClass->title : $oClass->name; >> //$classObj->legendLabel = $oClass->name; >> $classObj->filter = $oClass->getExpression(); >> $classMin = $oClass->minscale == -1 ? $layerMin : >> max($oClass->minscale, $layerMin); >> $classMax = $oClass->maxscale == -1 ? $layerMax : >> min($oClass->maxscale, $layerMax); >> $classObj->minScale = $classMin; >> $classObj->maxScale = $classMax; >> $classObj->index = $j; >> for ($k=0; $k<count($aScaleRanges); $k++) { >> if ($classMin < $aScaleRanges[$k]->maxScale && >> $classMax > $aScaleRanges[$k]->minScale) { >> array_push($aScaleRanges[$k]->styles, $classObj); >> } >> } >> } >> >> This block starts around line 306. My code change looks for a >> CLASS->TITLE and uses that and if not found falls back on the >> CLASS->NAME. I've tested and it works perfectly! I would really like >> to >> not have to manually maintain my custom code here. Thanks! >> >> - Tim >> >> ---- >> Timothy J Nolte - [hidden email] >> Network Planning Engineer >> >> iPCS Wireless, Inc. >> 4717 Broadmoor Ave, Suite G >> Kentwood, MI 49512 >> >> Office: 616-656-5163 >> PCS: 616-706-2438 >> Fax: 616-554-6484 >> Web: www.ipcswirelessinc.com >> -----Original Message----- >> From: [hidden email] >> [mailto:[hidden email]] On Behalf Of Nolte, Tim >> Sent: Tuesday, September 08, 2009 4:14 PM >> To: [hidden email] >> Subject: [fusion-users] Proper Class Names in MapServer Mapfile >> >> I have figured out how to give properly formatted names to groups and >> layers. The problem I run into now is I have a few layers that I am >> classifying. These classified layers are showing the crude CLASS -> >> NAME >> (e.g. 'on_air_evdo') but I want to have Fusion show a properly >> formatted >> name (e.g. 'EVDO On-Air'). Thanks. >> >> - Tim >> >> ---- >> Timothy J Nolte - [hidden email] >> Network Planning Engineer >> >> iPCS Wireless, Inc. >> 4717 Broadmoor Ave, Suite G >> Kentwood, MI 49512 >> >> Office: 616-656-5163 >> PCS: 616-706-2438 >> Fax: 616-554-6484 >> Web: www.ipcswirelessinc.com >> _______________________________________________ >> fusion-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/fusion-users >> >> _______________________________________________ >> fusion-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/fusion-users > > > __________________________________________ > > Paul Spencer > Chief Technology Officer > DM Solutions Group Inc > http://research.dmsolutions.ca/ > > > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users > -- Julien-Samuel Lacroix Mapgears http://www.mapgears.com/ _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
|
Paul Spencer-2
|
Sounds good Tim. Note the 2.0 branch will be replaced by trunk and we
are going to restart the 2.0 release. But I don't think LoadMap.php has changed between 2.0 and trunk so no matter. Cheers Paul On 2009-09-09, at 10:42 AM, Nolte, Tim wrote: > Does anyone object if I just build a ticket in Trac for this? I'm > proposing this as a change to the 2.0 branch. > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > > -----Original Message----- > From: [hidden email] > [mailto:[hidden email]] On Behalf Of Nolte, Tim > Sent: Wednesday, September 09, 2009 9:40 AM > To: Julien-Samuel Lacroix > Cc: [hidden email]; [hidden email] > Subject: RE: [fusion-users] Proper Class Names in MapServer Mapfile > > It would seem to me that if $class->title was add that long ago there > should be no question of whether this can be incorporated into > Fusion. I > wouldn't think people would be using Fusion with anything older then > 4.x > MapServer/MapScript. > > - Tim > > ---- > Timothy J Nolte - [hidden email] > Network Planning Engineer > > iPCS Wireless, Inc. > 4717 Broadmoor Ave, Suite G > Kentwood, MI 49512 > > Office: 616-656-5163 > PCS: 616-706-2438 > Fax: 616-554-6484 > Web: www.ipcswirelessinc.com > -----Original Message----- > From: Julien-Samuel Lacroix [mailto:[hidden email]] > Sent: Wednesday, September 09, 2009 9:31 AM > To: Nolte, Tim > Cc: [hidden email]; [hidden email] > Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile > > Hi, > > It seems to have been added in MapServer 3.6. I'm not sure if Fusion > with a version that old. > > http://trac.osgeo.org/mapserver/changeset/1389 > > Julien > > Nolte, Tim wrote: >> Daniel, >> >> Do you have further insight into Paul's question? >> >> - Tim >> >> ---- >> Timothy J Nolte - [hidden email] >> Network Planning Engineer >> >> iPCS Wireless, Inc. >> 4717 Broadmoor Ave, Suite G >> Kentwood, MI 49512 >> >> Office: 616-656-5163 >> PCS: 616-706-2438 >> Fax: 616-554-6484 >> Web: www.ipcswirelessinc.com >> >> -----Original Message----- >> From: Paul Spencer [mailto:[hidden email]] >> Sent: Tuesday, September 08, 2009 4:48 PM >> To: Nolte, Tim >> Cc: [hidden email] >> Subject: Re: [fusion-users] Proper Class Names in MapServer Mapfile >> >> Tim, do you know in which mapserver version $class->title got added >> to > >> mapscript? What will happen in older mapserver installs, will it >> return an empty string? >> >> Paul >> >> On 2009-09-08, at 4:45 PM, Nolte, Tim wrote: >> >>> OK, so I decided to do a little digging in the MapServer code. I'd >>> like >>> to propose the following code change in the LoadMap.php: >>> >>> //create classes and slot them into the scale breaks >>> for ($j=0; $j<$layer->numclasses; $j++) { >>> $oClass = $layer->getClass($j); >>> $classObj = NULL; >>> // Use formatted legend label as defined by CLASS->TITLE >>> $classObj->legendLabel = $oClass->title != '' ? >>> $oClass->title : $oClass->name; >>> //$classObj->legendLabel = $oClass->name; >>> $classObj->filter = $oClass->getExpression(); >>> $classMin = $oClass->minscale == -1 ? $layerMin : >>> max($oClass->minscale, $layerMin); >>> $classMax = $oClass->maxscale == -1 ? $layerMax : >>> min($oClass->maxscale, $layerMax); >>> $classObj->minScale = $classMin; >>> $classObj->maxScale = $classMax; >>> $classObj->index = $j; >>> for ($k=0; $k<count($aScaleRanges); $k++) { >>> if ($classMin < $aScaleRanges[$k]->maxScale && >>> $classMax > $aScaleRanges[$k]->minScale) { >>> array_push($aScaleRanges[$k]->styles, $classObj); >>> } >>> } >>> } >>> >>> This block starts around line 306. My code change looks for a >>> CLASS->TITLE and uses that and if not found falls back on the >>> CLASS->NAME. I've tested and it works perfectly! I would really like > >>> to >>> not have to manually maintain my custom code here. Thanks! >>> >>> - Tim >>> >>> ---- >>> Timothy J Nolte - [hidden email] >>> Network Planning Engineer >>> >>> iPCS Wireless, Inc. >>> 4717 Broadmoor Ave, Suite G >>> Kentwood, MI 49512 >>> >>> Office: 616-656-5163 >>> PCS: 616-706-2438 >>> Fax: 616-554-6484 >>> Web: www.ipcswirelessinc.com >>> -----Original Message----- >>> From: [hidden email] >>> [mailto:[hidden email]] On Behalf Of Nolte, >>> Tim >>> Sent: Tuesday, September 08, 2009 4:14 PM >>> To: [hidden email] >>> Subject: [fusion-users] Proper Class Names in MapServer Mapfile >>> >>> I have figured out how to give properly formatted names to groups >>> and >>> layers. The problem I run into now is I have a few layers that I am >>> classifying. These classified layers are showing the crude CLASS -> >>> NAME >>> (e.g. 'on_air_evdo') but I want to have Fusion show a properly >>> formatted >>> name (e.g. 'EVDO On-Air'). Thanks. >>> >>> - Tim >>> >>> ---- >>> Timothy J Nolte - [hidden email] >>> Network Planning Engineer >>> >>> iPCS Wireless, Inc. >>> 4717 Broadmoor Ave, Suite G >>> Kentwood, MI 49512 >>> >>> Office: 616-656-5163 >>> PCS: 616-706-2438 >>> Fax: 616-554-6484 >>> Web: www.ipcswirelessinc.com >>> _______________________________________________ >>> fusion-users mailing list >>> [hidden email] >>> http://lists.osgeo.org/mailman/listinfo/fusion-users >>> >>> _______________________________________________ >>> fusion-users mailing list >>> [hidden email] >>> http://lists.osgeo.org/mailman/listinfo/fusion-users >> >> >> __________________________________________ >> >> Paul Spencer >> Chief Technology Officer >> DM Solutions Group Inc >> http://research.dmsolutions.ca/ >> >> >> _______________________________________________ >> fusion-users mailing list >> [hidden email] >> http://lists.osgeo.org/mailman/listinfo/fusion-users >> > > -- > Julien-Samuel Lacroix > Mapgears > http://www.mapgears.com/ > > _______________________________________________ > fusion-users mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/fusion-users > __________________________________________ Paul Spencer Chief Technology Officer DM Solutions Group Inc http://research.dmsolutions.ca/ _______________________________________________ fusion-users mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/fusion-users |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |