So someone else explain this to me:
I have a Pro project (currently using 2.7.4) with a map in WGS84. To this I add a layer that is NAD27. NAD27 data is transformed on the fly to line up with WGS84 basemap. Great. That's what I've come to expect for many years.
Now, I publish this as a map service to ArcGIS Server and create an app using that service.
Next, I create a layout template using my Pro map and export to file.
Then I use Javascript and Python to create a web map from JSON passed from web app into GP service using my layout (creating in-memory APRX). What I end up with are service layers (from map service) and what I think ESRI has dubbed staged vector layers (from the layout template).
The map now basically has set of 2 of each layer.
But those staged vector layers, while lining up with basemap in Pro project, no longer line up. They now plot like good ole NAD27 in Web Mercator land.
I don't think that layer templates have any record of spatial reference. But is there a way to avoid this? Is this by design? Has this always been like this? I haven't noticed it before. When I export the "in-memory" APRX to file and open in Pro, I see that things don't line up and that no coordinate system transformation has been specified. Well, duh! When I do that in Pro, things snap right back to where I'd like to see them.
Is there a way to do do programmatically as part of my geoprocessing logic?