[mapguide-users] RE: digitizing
kencana kesuma
bluesky_dyx at hotmail.com
Fri Dec 1 02:46:59 EST 2006
Hi,
as I am following the redline code so currently i am using line rule for my
layer
$layerExists = DoesLayerExist($layerName, $map);
if (! $layerExists )
{
// Create a new layer which uses that feature source
// Create a line rule to stylize the lines
$ruleLegendLabel = 'Lines Rule';
$filter = '';
$color = 'FF0000FF';
$factory = new LayerDefinitionFactory();
$lineRule = $factory->CreateLineRule($ruleLegendLabel, $filter,
$color);
// Create a line type style
$lineTypeStyle = $factory->CreateLineTypeStyle($lineRule);
// Create a scale range
$minScale = '0';
$maxScale = '1000000000000';
$lineScaleRange = $factory->CreateScaleRange($minScale, $maxScale,
$lineTypeStyle);
// Create the layer definiton
$featureName = 'SHP_Schema:Lines';
$geometry = 'SHPGEOM';
$layerDefinition = $factory->CreateLayerDefinition($featureSourceName,
$featureName, $geometry, $lineScaleRange);
//---------------------------------------------------//
// Add the layer to the map
$newLayer = add_layer_definition_to_map($layerDefinition, $layerName,
$layerLegendLabel, $sessionId, $resourceService, $map);
// Add the layer to a layer group
add_layer_to_group($newLayer,$groupName, $groupLegendLabel, $map);
}
therefore i guess maybe because of this i only see the outline of the
geometry. but I can't
fill any color to it..
Please don't mind
Regards,
Kencana
>From: "Farah" <farah at egovernments.org>
>Reply-To: users at mapguide.osgeo.org
>To: "'kencana kesuma'" <bluesky_dyx at hotmail.com>
>CC: <users at mapguide.osgeo.org>
>Subject: [mapguide-users] RE: digitizing
>Date: Fri, 1 Dec 2006 13:05:54 +0530
>
>Hi Kencana,
>
>Filling in the colour for the features in the temporary layer is very
>simple. Maybe you could open Mapguide studio, do a sample layer styling on
>an existing layer and then save that layer as xml. Check out that xml file
>to see how the styling is done.
>
>Here is a sample code for filling in the polygon: The below code is the xml
>file : polygon.xml for the temporary layer.It shows the polygon in red.
>
><?xml version="1.0" encoding="UTF-8"?>
><LayerDefinition version="1.0.0"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>xsi:noNamespaceSchemaLocation="LayerDefinition-1.0.0.xsd">
> <VectorLayerDefinition>
>
> <ResourceId></ResourceId>
>
> <FeatureName>ParcelMarker</FeatureName>
>
> <FeatureNameType>FeatureClass</FeatureNameType>
>
>
>
>
> <Geometry>Location</Geometry>
>
>
>
>
> <VectorScaleRange>
> <MinScale>0</MinScale>
> <MaxScale>100000</MaxScale>
> <AreaTypeStyle>
> <AreaRule>
> <LegendLabel></LegendLabel>
> <Label>
> <Unit>Points</Unit>
> <SizeContext>DeviceUnits</SizeContext>
> <SizeX>0.3</SizeX>
> <SizeY>4.0</SizeY>
> <Rotation>0</Rotation>
> <Text></Text>
> <FontName></FontName>
>
><ForegroundColor>FFFF0000</ForegroundColor>
>
><BackgroundColor>FFFFFFFF</BackgroundColor>
>
><BackgroundStyle>Ghosted</BackgroundStyle>
>
><HorizontalAlignment>'Center'</HorizontalAlignment>
>
><VerticalAlignment>Halfline</VerticalAlignment>
> <Bold>true</Bold>
> </Label>
> <AreaSymbolization2D>
> <Fill>
>
><FillPattern>Solid</FillPattern>
>
><ForegroundColor>FF800000</ForegroundColor>
>
><BackgroundColor>FF000000</BackgroundColor>
> </Fill>
> <Stroke>
> <LineStyle>Solid</LineStyle>
> <Thickness>0.0</Thickness>
> <Color>FFC0C0C0</Color>
> <Unit>Centimeters</Unit>
> </Stroke>
> </AreaSymbolization2D>
> </AreaRule>
> </AreaTypeStyle>
> </VectorScaleRange>
>
>
>
> </VectorLayerDefinition>
></LayerDefinition>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>-----Original Message-----
>From: kencana kesuma [mailto:bluesky_dyx at hotmail.com]
>Sent: Friday, December 01, 2006 12:46 PM
>To: farah at egovernments.org
>Subject: digitizing
>
>hi Farah,
>
>sorry for keep bugging you.
>please don't mind.
>as I told you before that i am trying to combine the digitizing and
>redlining method
>for drawing the circle,rectangle, and polygon.
>and I have successfully create it.
>however...I need to fill in the respective rectangle, circle, polygon with
>color.
>so far, i only can do the line color.
>any idea of this.what i want to do is exactly like "call before you dig"
>application sample.
>I hope you can help me out
>thank you very much once again
>
>Regards,
>Kencana
>
>_________________________________________________________________
>Don't just search. Find. Check out the new MSN Search!
>http://search.msn.com/
>
>-----Original Message-----
>From: kencana kesuma [mailto:bluesky_dyx at hotmail.com]
>Sent: Friday, December 01, 2006 12:46 PM
>To: farah at egovernments.org
>Subject: digitizing
>
>hi Farah,
>
>sorry for keep bugging you.
>please don't mind.
>as I told you before that i am trying to combine the digitizing and
>redlining method
>for drawing the circle,rectangle, and polygon.
>and I have successfully create it.
>however...I need to fill in the respective rectangle, circle, polygon with
>color.
>so far, i only can do the line color.
>any idea of this.what i want to do is exactly like "call before you dig"
>application sample.
>I hope you can help me out
>thank you very much once again
>
>Regards,
>Kencana
>
>_________________________________________________________________
>Don't just search. Find. Check out the new MSN Search!
>http://search.msn.com/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
>For additional commands, e-mail: users-help at mapguide.osgeo.org
>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the Mapguide-users
mailing list