[mapserver-users] Question re: city points layers and markers

Gregory Collins greg at gregorycollins.net
Tue Feb 17 13:29:43 EST 2009


Stephen Woodbridge <woodbri at swoodbridge.com> writes:

> Gregory Collins wrote:
>> Hello all,
>>
>> Sorry if this question has an answer in the existing documentation but
>> I've been struggling for days and can't find a solution.
>>
>> I'm trying to render a city points layer on a regional-level map. I want
>> point markers to be placed for all of the cities which are important
>> enough to get labels, but no markers for unlabeled cities.
>>
>> If I use a layer of type "point", I get markers for all of the points,
>> which I don't want. The documentation says that for annotation layers,
>> "Annotation means that a label point will be calculated for the
>> features, but the feature itself will not be drawn although a marker
>> symbol can be optionally drawn", but I can't seem to get it to draw the
>> markers.
>>
>> What am I doing wrong?
>>
>> G.
>
> It would probably help if you show the LAYER definition from your mapfile.
>
> -Steve W

Here's an elided version (the rest of the classes in this layer are
similar):

##### Layer NamedPlc ###################################################
LAYER
	CONNECTION                    "MYSQL:Navteq,user=***,password=***,host=***,tables=NamedPlc"
	CONNECTIONTYPE                OGR
	DATA                          "SELECT the_geom, poi_name, population, capital FROM NamedPlc WHERE MBRIntersects(GeomFromText('Polygon((%ominx% %ominy%, %ominx% %omaxy%,%omaxx% %omaxy%, %omaxx% %ominy%,%ominx% %ominy%))'), the_geom) ORDER BY population DESC"
	LABELCACHE                    on
	LABELITEM                     poi_name
	MINSCALEDENOM                 3381.6146550891413
	MAXSCALEDENOM                 886496206.5436879
	NAME                          "NamedPlc"
	TYPE                          annotation
	PROJECTION
		"proj=longlat"
		"ellps=WGS84"
		"datum=WGS84"

	END #projection

	#-----------------------------------------------------------------
	CLASS
		# country capital at level 0
		OUTLINECOLOR                 80 0 0 
		EXPRESSION                   ('[capital]' == '1')
		SYMBOL                       "unfilledcircle"
		OVERLAYCOLOR                 80 0 0 
		OVERLAYOUTLINECOLOR          80 0 0 
		OVERLAYSYMBOL                "star"
		OVERLAYSIZE                  11.0

		LABEL
			ANGLE                         0.0
			COLOR                         255 255 255 
			FONT                          "roman"
			OUTLINECOLOR                  0 0 0 
			PARTIALS                      False
			PRIORITY                      10
			SIZE                          11.0
			TYPE                          truetype
		END #(end label)

		SIZE                         11.0
	END #(end country capital at level 0)


G.
-- 
Gregory Collins <greg at gregorycollins.net>


More information about the mapserver-users mailing list