This project has moved and is read-only. For the latest updates, please go here.

Labeling and WMS overlay

Topics: General Topics
May 1, 2007 at 4:24 PM
This is probably two questions, but it goes to the same problem. I've got a hand full of LabelLayers displaying and they work fine, however I have noticed that the labels are generated from the entire geometry of the feature, instead of using the geometry that is within the map extent. So, If I have a linestring (Highway) that runs across the entire map extent....there is only one label being placed. And if I zoom to a specific area within my map extent, the label is not's only being generated for the full extent...and not current extent of the map. Is there a way around this. I'm wanting the labels for the 'Highway' to show up no matter what my zoom level is.

To find a workaround, I am trying to load an annotation layer from my WMS service as an overlay on the map. With other online mapping applications (i.e. OpenLayers, msCross, etc...). If I load the same annotation layer, the 'white' space on the image is transparent...and it works fine. I am able to see through empty areas down to my other layers. However, in SharpMap is not passing that transparency through. It is creating the map without the transparency, so the rest of my layers are covered by the label layer. Is there a solution to this. So that I can render an overlay from a WMS service and still see layers underneath?

Thanks for any help,

May 1, 2007 at 6:06 PM
Well, I figured out the WMS problem. So I have a solution for labeling. It would still be nice to know if I can label within SharpMap the way I want (i.e. have labels show within the zoom extent, instead of just map extent)