Our Add-In requires that we translate coordinates on a Map to coordinates on a Layout that contains a given MapFrame. Per a previous discussion, this has to be done manually, at least for now - unless there is some way I'm unaware of to easily ask the SDK, "Where is this MapPoint represented on the page within this given map frame?"
That in mind, I'm using the map frame camera's Scale property, along with the camera's spatial reference's unit and the page's unit, to determine a number that represents the "page units per map unit." The linked post includes an example that assumes map units in feet and page units in inches, but this assumption won't necessarily hold true. I use the "page units per map unit" figure to relate real-world map distances to distances on the page.
I'm not sure how to apply this scheme (if it can be applied) to situations where the map frame's map and camera have angular units. What does the camera's Scale property really mean when the camera's units are angular? API documentation describes the Scale property as "a ratio of distance on the map to reality." Is there some way in which, for instance, decimal degrees are being "converted" to meters?
I will need to get back to you because I do not know the answer to you question. But I'm curious, at Pro 2.6 we are introducing map graphics. The ability to digitize map graphic elements (text, shapes, etc) onto a map view (or an activated layout). Those graphics live in map space but display just the same if the map is added to a mapframe on a layout. Will this be a better solution for you?
Jeff - Layout Team
I'm not sure that would be a better solution, but it could be a solution. Our application is centered on creating fairly elaborate layouts, which customers will generally print or view as PDFs. It would be preferable to leave Maps "as is" and create Layout elements whose positions are synced with Map Points within a Map Frame. However, the solution you're talking about may work for essentially the same purpose.
I'm not sure I understand how map graphics are different from existing functionality, however. Are we talking about text and shapes completely distinct from the features stored in feature classes? Would these graphics simply be stored in the Project file, and not within some other database (e.g. a geodatabase)?
David, map graphics are NEW at Pro 2.6. This is ArcMap equivalency functionality being added. The graphics are drawn in map space on for a given map. They appear as graphics layers (similar to a feature layer) in a map's TOC and scale like features and are persisted in a project with a map. They are NOT stored in a GDB. They honor the maps settings including Spatial Reference and rotation changes. There is a limited SDK for map graphics at 2.6 but we have plans to introduce bulk creators to increase performance later. I'm not saying its your solution but it may be something worth looking into.
David, here is the response from one of our developers concerning angular units:
"The way angular units are converted to linear units for this purpose in Pro is to get the circumference of the datum from the spatial reference. The circumference is determined by the major axis of the datum. This circumference represents 360 degrees or 2pi radians, so the conversion would be circumference/360 (linear units (m) per degree).
Note that in ArcMap there was just a hardcoded constant, regardless of which datum was used."
I hope this helps,
Jeff - Layout Team