Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Following is the code snippet that does not draw both TextSymbols.

private function MapClick(evt:MapMouseEvent):void
            var cs:CompositeSymbol = new CompositeSymbol();
            var textSymbol1:TextSymbol = new TextSymbol("hello");
            textSymbol1.textFormat= new TextFormat("Arial",5);
            var textSymbol2:TextSymbol = new TextSymbol("hello 123");
            textSymbol1.textFormat= new TextFormat("Arial",10);

            var myPolygon:Polygon = new Polygon(
                    new MapPoint(evt.mapPoint.x+5, evt.mapPoint.y+8),
                    new MapPoint(evt.mapPoint.x+10, evt.mapPoint.y+12)
                ]], new SpatialReference(4326));
            cs.symbols= [textSymbol1, textSymbol2, new SimpleFillSymbol(SimpleFillSymbol.STYLE_BACKWARD_DIAGONAL,0xFF00FF,1)];
            var m_graphic:Graphic = new Graphic(myPolygon , cs );
            gLayer.add( m_graphic );

TextSymbols accept point geometry and I am assigning them with multipoint geometry I think that is where problem lies. I need to draw TextSymbols all around the polygon so how can I accomplish it. I am using FlexViewer 2.5.

Any help would be highly appreciated. Thanks

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.