ThinkGeo.com    |     Documentation    |     Premium Support

Error when setting the Text property on a Marker

I get the following error when assigning the Text property of a Marker:

“Object reference not set to an instance of an object.: at ThinkGeo.MapSuite.Mvc.Map.xVA=(Bitmap bitmap, PlatformGeoCanvas geoCanvas, Collection`1 markers) at ThinkGeo.MapSuite.Mvc.Map.GetBitmap(Int32 width, Int32 height)”

The marker shows up correctly except when I assign the text:

        var markerImage = new WebImage("~/Content/marker.gif",21, 25, -10, -33);
        markerImage.Text = "x";
        markerImage.FontStyle = new GeoFont("verdana", 10f, DrawingFontStyles.Regular);
        markerImage.FontColor = GeoColor.StandardColors.Black;
        markerImage.TextBackgroundColor = GeoColor.SimpleColors.Transparent;

Any help would be appreciated.

-jason

Hi Jason,

Could you please provide us more code? It looks the WebImage is not our class, and your exception is thrown in the function GetBitmap, more code should be helpful to make sure where is the problem.

Regards,

Ethan