ThinkGeo.com    |     Documentation    |     Premium Support

How to add unique bitmaps for each point in a layer?

I have a layer with a bunch of points on it. I have some bitmaps in memory, where each bitmap corresponds to a point, and I want to display these bitmaps on the map where the points are. What is the best way to go about this? Do I have to manually draw these on the map or is there a simpler way to just “attach” each bitmap to its respective point?

Thanks!

Hi @Dan_Weaver,

Thanks for posting your question. There is definitely a simpler way than to manually draw each point. Typically in a case like yours, you are showing a different bitmap based on data in the point’s FeatureSource? For example, you’re wanting to use one bitmap if a column value is ‘dog’ and another bitmap if the column value is ‘cat’?

If so, then you can check out our ‘HowDoI’ samples for WPF here. The first styling option that comes to mind is the FilterStyle. A screenshot of this ‘HowDoI’ sample and code is below:

Of course, there are other styles that can also be used. A ValueStyle is also useful for this type of styling and you can also see it in the ‘HowDoI’ samples. Also, if you have a range of values you want to style by, then you can use a ClassBreakStyle that can also be found in the ‘HowDoI’. Although the ClassBreak sample is using Polygon shapes, it can be used on Point shapes just the same.

We also have a recent blog post where we go into more details on many other styles as well as creating your own style. Let us know if you still have other questions and we’ll work with you to find the best solution.

Thanks,
John

Hey thanks for the response! So I’m not quite sure if a style would work. Every single point has a unique Image associated with it. So I’d essentially have to create a new point style for every single image right?

Hi Dan,

How is each unique image associated with the point? Do you have some sample data? Or is it shapefile with a .dbf file that has a filename for each point? Or is it coming from a database as base64, etc.?

But, either way, there’s some style that will work even if we end up Creating a Custom Style.

Thanks,
John