Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to mark a point in map and place text near it. I used QgsVertexMarker to mark point .As far as now i am using tool-tip to show text. but i need clean code to show my text on map.

Following code is used to set marker at point A.

QgsVertexMarker * marker = new QgsVertexMarker(mPlugin->iface()->mapCanvas());

I need to display a text near that point . how to do by c++ code?

share|improve this question
What did you try at your end? Did you use Google for this? – Sunil Oct 21 '13 at 10:43
Hello Bavani, from your edit, I have now realized that you want to do it by coding. You should edit your question to make clear that you are doing it using Python or C++, and the piece of code that you are using. – Alexandre Neto Oct 22 '13 at 8:35
i want to do by c++ coding. – Bavani Oct 23 '13 at 4:29
up vote 1 down vote accepted

If all you want is to add one single placemark at a known place, you can use text Annotations.

enter image description here

Best regards,

Alexandre Neto

share|improve this answer
Please see my edit. I want to add point with text dynamically so i cant use text annotation. – Bavani Oct 22 '13 at 5:39
again see my answer only use dynamic text through easy lable creator – Ger Oct 22 '13 at 16:29
Please see my edit. – Bavani Oct 23 '13 at 4:31

I would suggest placing a point at the said co-ordinates by creating a new point layer. then placing a point on the screen (anywhere). Then using "Numerical Vertex Edit" (whilst in edit mode), highligh the point, and enter your coords.

The create label. You will have to have given your layer some attribute in order to create the lable.

share|improve this answer
Please see my edit. – Bavani Oct 23 '13 at 4:32
Why re-invent the wheel? Use any of the lable feautres. – Ger Oct 23 '13 at 7:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.