How to configure Datum Transformations in the HTML5 Viewer 2.8
The configuration is ok the SilverlightViewer. However, unfortunately I am not sure of the congis for the HTML5 (json) aspects. The online documentation tells of the all the right parameters to datumTransform, but gives no example of setting it up. On another note, HTML5 doesn't seem to give recognize my WKID of 6135 or even 15830 (as written in the ESRI pages) - says it's invaid when I try to add the coornidate system from the manager. Any help is appreciated, especially in the datumTransorm bit as I really need to get these transformation going.
Thanks in advance,
//Houdini
0
-
Try the old projection 6177 0 -
@Sylvia, Trying 6177, yields the same error result: "You have selected a geographic output type. Please enter a valid WKID for a geographic coordinate system."
When debug the silverlight viewer, every request my GeomertyServer has the following parameters: inSR, outSR, geometries, transformation, and transformForward.
Observing the HTML5 requests on the other hand shows only the following parameters being passed to the GeometryServer: inSR, outSR, and geometries.
This is the core of the problem, because when I open the GeomeryServer dierectly it needs the transformation parameter or else it will not do the transformation. In Viewer.xml for the Silverlight viewer there is a section defining the datumTransforms as follows (i'll just show one):
<DatumTransforms>
<DatumTransform WKT="GEOGTRAN["WGS84_To_NAD27_Ft",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],METHOD["Coordinate_Frame"],PARAMETER["X_Axis_Translation",179.48644],PARAMETER["Y_Axis_Translation",69.373657],PARAMETER["Z_Axis_Translation",27.594132],PARAMETER["X_Axis_Rotation",-7.86223912],PARAMETER["Y_Axis_Rotation",8.16276969],PARAMETER["Z_Axis_Rotation",6.04231114],PARAMETER["Scale_Difference",13.92519391]]" FromWKID="6135" ToWKT="PROJCS["NAD_1927_UTM_Zone_17N",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",1640419.947506562],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-81.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Foot",0.3048]]" />
.
.
.
</DatumTransforms>
However, in HTML5 (Desktop.json.js) I don't know how to add this datumTransform, I am merely guessing at the syntax based on what I have reviewed in the HTML5 viewer Developer's documentation (which gives no examples by the way). It says this:
"When you configure one or more datumTransforms, the viewer does not use the built-in datum
transformations—the built-in transformations are only used if datumTransforms is empty.
A datumTransforms item has the properties listed below. To specify a datum transformation using the wellknown
ID (WKID), configure transformWkid, fromWkid, and toWkid. To use the well-known text (WKT)
instead of the WKID, configure transformWkt, fromWkt, and toWkt.
l transformWkid: The WKID of the datum transform to use.
l transformWkt: The WKT of the datum transform to use. This is ignored if transformWkid is also
specified.
l fromWkid: The WKID of the spatial reference to project from.
l fromWkt: The WKT of the spatial reference to project from. This is ignored if fromWkid is also specified.
l toWkid: The WKID of the spatial reference to project to.
l toWkt: The WKT of the spatial reference to project to. This is ignored if toWkid is also specified. "
Now then, I beleive the reason the requests to the GeometryServer coming from the HTML5 viewer (when you attempt to switch coordinate systems) does not contain the "transformation and tansformForward" parameters is due to the fact that the datumTransforms is not properly constructed for the HTML5 viewer. And this is friends is what I am seeking help with.
Thanks again.
//Houdini0 -
The datumTransforms array has to be wrapped in the application object:
"application":{
.
.
.
"datumTransforms":[
.
.
.
]
}
That's the object where you configure the proxiUri, geometryServiceUrl and some other stuff as well.
--peace0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare