Hello
Problem Statement
I need to display Schematic Diagrams created in ArcEditor 10.2.1 (with the Schematics extension) in a web browser client. The diagrams have been created using ArcObjects/C# using a Selection set of the features retrieved using a DownStream trace for Electric Substations.
The schematic diagram when accessed from a web browser client using JavaScript opens the diagram successfully. But the diagram appears very small even after the extents of the map are set to the extents of the diagram.
Description
I am using ArcGIS Server 10.2.1 on Windows Platform with Enterprise Geodatabase in SQL Server 2012. The Schematics are stored in SQL Server. These schematics have been created using ArcObjects and are updated every night.
The Schematic template used to create the schematics has been published as a dynamic map service. I make use of the Javascript API to query the Dynamic map service to get the diagram ID. I am using this Diagram ID to add the schematic to to the map.
At the time of opening the map i am programmatically setting the extents of the map to the EXTENT of the schematic returned by ArcGIS Server. But this extent covers a much bigger area. This when viewed on the screen exceeds the actual extent of the image causing the schematic to appear very small in the map. My objective i set the extents of the map to the extents of the features in the schematic.
Pls refer to the attached diagram. The dotted line indicates the extent returned by schematic.
We are not forcing any extent to be set at the time of generating the schematic using ArcObjects.
Regards
Govindarajan
Did you set a spatial reference for the template your diagrams are based on?
Did you set a spatial reference for all schematic feature classes that are associated with this template?
If not, you should do that. In that case, no programmatic setting of the map extent should be needed.
See those help topics for more information:
Anne
Thanks for responding. We had set the projection for both the Schematic Feature classes and the Diagram template. I verified it once again today. I checked it for all the Schematic featureclasses.
I also exported the projection PRJ file and compared it with the WKT text that i am using to set the Spatial Reference in the JavaScript code. It is matching.
The interesting bit is.. when i open the diagram in ArcMap, it opens exactly to fit the extent of the ArcMap window. So it works in ArcMap without any issues.
However when i open it with the Schematic Viewer distributed by ESRI or with my customized app the extent of the Schematic Diagram is much smaller than the extent returned by ArcGIS Server causing the schematic to appear at a corner of the map.
Not sure what is causing this.
Regards
Govind