Hi,

I'm trying to add a circle feature to a layer using MapInfo's MapX.
I want the circle's radius to be relative to the screen, i.e. it doesn't
resize when zooming in or out. I want it's position to be relative to
the map (WGS-84).

Does anyone know what styles to apply when creating such a feature?

This is the code that I have at present...


CMapXFeatureFactory featureFactory = GetFeatureFactory();
circle = featureFactory.CreateCircularRegion(miCircleTypeScreen,
                                             point,
                                             0.1, //100m
                                             miUnitKilometer,
                                             16); //16 segments to
circle
circle.SetType(miFeatureTypeLine);

CMapXStyle style;
style = circle.GetStyle();
style.SetLineColor(RGB(255,0,0));
style.SetLineWidth(3);
style.SetLineStyle(1);
circle.SetStyle(style);

// Add circle feature to the layer.
GetLayers().Item("circles").AddFeature(circle);



Kind regards

Tim









All literature contained within this message and/or attached, is the
opinion of myself and does not reflect the opinion of the company.

Tim Smith
Software Engineer

Micromill Electronics Limited
Leydene House
Waterberry Drive
Waterlooville
Hants
PO7 7XX

Tel: +44 (0) 23 92 366600
Fax: +44 (0) 23 92 364 068
Sales Fax: +44 (0) 23 92 366673

email: [EMAIL PROTECTED]

Registered No. 1456922 (England). 
Registered Office Brook Road
Wimborne, Dorset BH21 2BJ
*********************************************************************
This e-mail and any attached files are confidential and may be legally
privileged. If you are not the addressee, any disclosure, reproduction,
copying, distribution, or other dissemination or use of this
communication is strictly prohibited. If you have received this
transmission in error please notify the sender immediately and then
delete this e-mail.

It is the policy of Micromill Electronics Limited that no legally
binding statements, representations or commitments (collectively
'statements') may be made by e-mail. Any such statements must be
confirmed either by facsimile transmission or by post before they will
have legal effect. The sender of this e-mail is not authorised to commit
the company in any way and the addressee is hereby formally notified of
that fact.

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 12182

Reply via email to