#MAPSERVER IRC Log - 2009-11-12

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
00:11:34 CIA-5: tbonfort * r9545 /branches/branch-5-4/docs/_static/ol.js: disable mousewheel zoom on map
01:04:39 CIA-5: tbonfort * r9546 /trunk/mapserver/HISTORY.TXT: add missing bug number
06:28:34 mdev: Hi, I'm wondering how do you change the name of a country label coming from DBF in the mapfile?
06:28:51 mdev: I looked at variable substitution doc but that is only for DB
06:32:00 mdev: does assefa, AlanB, or FrankW know how I can change the names of countries from a dbf in the mapfile without altering the dbf?
06:33:15 mdev: I could use an expression to find the value I want to substitute but how is the actual substituion made?
06:40:46 assefa: mdev: class object has a text element that overrides values coming from labelitem. You might be able to use that
06:41:42 mdev: that's what I figured but it doesn't seem to work to override
06:41:56 mdev: dose the order where the text element is placed inside the class matter?
06:42:03 mdev: before the expression or after
06:42:15 assefa: It should not matter
06:43:15 mdev: well then it's not working...
06:43:24 mdev: I'm doing it in mapscript
06:43:44 mdev: watch:
06:43:45 mdev: $class->setExpression( "United States" );
06:43:45 mdev: $class->set( "text", 'USA' );
06:43:55 mdev: what's wrong with that?
06:45:16 mdev: Fatal error: Property 'text' does not exist in this object.
06:45:47 assefa: let me check ...
06:45:53 mdev: http://mapserver.org/mapscript/php/index.html#layerobj-class
06:45:54 sigabrt: Title: PHP MapScript MapServer 5.4.2 documentation ( at mapserver.org )
06:46:10 mdev: the classObj doesn't have a text variable
06:46:13 mdev: but mapfile does
06:46:14 mdev: weird?
06:46:31 assefa: settext is the function to use class->settext
06:47:15 mdev: $class->setExpression( "United States" );
06:47:15 mdev: $class->settext( "USA" );
06:47:16 mdev: ?
06:47:18 mdev: didn't work
06:48:33 mdev: do the labels need to be redrawen?
06:49:17 assefa: what didn't work: is it the expression ( does the rendering pass through the class ) ?
06:49:34 mdev: it doesn't fail
06:49:36 assefa: you need to do the setting that you are doing before any draw
06:49:39 mdev: but the label dosen't change
06:49:49 mdev: yeah, the draw happens at the end
06:49:56 mdev: $image=$map->draw( );
06:49:57 mdev: $map->drawLabelCache( $image );
06:50:01 mdev: that is way after
06:50:15 mdev: the original United States Label remains
06:50:22 mdev: instead of altered one
06:51:38 mdev: Ok, i got it!
06:51:52 mdev: the problem was that I didn't define label properties for this class individually
06:52:31 mdev: thanks
07:55:53 mdev: how come when I use MS_AUTO for labels, some of the labels come out doubled over themselves
08:07:48 mdev: mindistance and buffer did not fix this
09:07:35 hobu: thanks tbonfort
09:08:00 tbonfort: np, you were absolutely right on that one
11:04:32 ue: Good day all, what MINWIDTH in STYLE do ? does it refer to that the geometry's width or height > $value in pixels, or that the WIDTH value of this style is > $value in pixels ?
11:09:01 AlanB: It's the lower bound that the values in your style can be scaled.
11:09:59 AlanB: ie, if you have WIDTH 18, MINWIDTH 12, .. even if a map would scale the WIDTH to 6, mapserver will keep 12.
11:20:44 ue: AlanB, thx u
23:34:07 scottp: I know the answer is on the net somewhere, clearly I have failed at google - can someone point me to a config map file ( layer ) for accessing DEM SRTM30 data?