GeoMedia Discussions

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Posts: 39
Registered: ‎11-02-2017
Accepted Solution

How to draw a rectangle on the MapView?



Maybe an easy question but I am unable to find a way.


How can I draw a small rectangle on the MapView using GeoMedia Objects and fill it with a certain color?


Does anybody have any code example they could provide in VB.NET?


Many thanks





Technical Evangelist
Posts: 557
Registered: ‎09-11-2015

Re: How to draw a rectangle on the MapView?

Hi Adrian,


there is no way to draw directly to the MapView. The data must exist in a database. However, you can use the CustomDataPipe object to create an in-memory recordset, populate it with data and then create a symbology and legend entry for that data. You can make your legend entry hidden, so that it is not visible to the end user, yet is still must be there.


To draw a rectangle, you can either create a polygon geometry (I would discourage you to use RectangleGeometry object) and create an are symbology, or you can create a point geometry and use an svg symbol for it.


Attached is a small C# example of CustomDataPipe.



Regular Contributor
Posts: 226
Registered: ‎05-25-2016

Re: How to draw a rectangle on the MapView?

[ Edited ]

Hi Adrian


You can do this with a GeometryDigitizeService too. Add a Style object and the rectangel vertexes to the service

I think, it's easier than with a CustomDataPipe object. But works both ways.


Best regards