Re: Error with MapProjection::Forward [message #86683 is a reply to message #86679] |
Thu, 28 November 2013 05:23   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Madhavan Bomidi writes:
> This is very useful and more general code.
>
> One more clarification is required. Can you provide me an example of inserting a text by the side of the symbol plotting with cgPlotS or some other tool?
Add this code to the end of the example you found on the Gallery page:
; Add a label for the restaurant.
xy = map -> Forward(-105.1, 40.6)
loc = Convert_Coord(xy[0], xy[1], /Data, /To_Normal)
cgText, loc[0], loc[1]+0.025, 'Prairie Dog Restaurant', /Normal, $
Alignment=0.5, Color='red', Font=0
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|