I got two questions!
In RenderGeometry I found that the check between what kind of primitive the geometries are of, is done byt cheking the full name of the object type agains the string corresponding to the object, as seen here below.
case "SharpMap.Geometries.Polygon": ... DO RENDERING... break;
Wouln't it be better to use the "is" operator instead (see below), or am I missing something?
if(feature is SharpMap.Geometries.Polygon)
What's the best way to go, in order to create my own primitves and have them rendered.
Such as making a geometry that has both graphics (symbol, img) as well as some text bound to it?
Aug 24, 2007 at 12:55 AM
Edited Aug 24, 2007 at 12:58 AM
Yes, this is a broken way to check the type. There had been someone else who had pointed this out a while ago, too. It's not this way in v2.0, but I don't have the time to fix the v1.0 code.
As for your second question, have you tried just creating your own geometry with the GeometryProvider? You can give it a list of Geometries and SharpMap will render it. Here is an example:
Add a primitive geometry.