Print error - coordinate system WKT definition is invalid: '102100' is not recognized
I am having an issue printing from an HTML5 viewer. The problem seems to be new after no changes to the site or viewer that I can think of. When using the Print tool I get the following error:
Alert
Print error: Exception has been thrown by the target of an invocation. geometry The given value does not represent a valid ArcGIS Server REST JSON format spatial reference. The coordinate system WKT definition is invalid: '102100' is not recognized. '102100' is not recognized.
The site that this site was copied from also has an HTML5 viewer from which printing works. As far as I can tell they are set up the same - they both use an ArcGIS Online primary map service to set the projection. That service lists the spatial reference as 102100 (3857). The other layers are all also 102100. They are also using the same print templates.
Any thoughts on what the error message means exactly? And why it appears on one site but not the other?
Geocortex 4.4.2
HTML5 2.5.2
REST page for working version:
http://coagisweb.cabq.gov/Geocortex/Essentials/geo42/REST/sites/AddressLookup/map
REST page for problem version:
http://coagisweb.cabq.gov/Geocortex/Essentials/geo42/REST/sites/AddressLookup_for_Report/map
Thanks for any help!
0
-
Hi Mike,
I tried printing from both sites at the REST endpoint and it works. I would suggest clearing your browser cache and then it trying it again. Sometimes reloading the site works as well.
If you removed the basemap, does the printing on the AddressLookup_for_Report site work?
I hope this helps,
Carmen0 -
Thanks for the suggestions. I tried clearing the browser cache and also using fresh browsers on other computers - no luck. Also reloading the site and removing the basemaps. I can print from the REST endpoints though.
Thanks,
Mike0 -
Update: The Print function works when the map is viewed at a stand alone application:
http://coagisweb.cabq.gov/GeoHtml5/Index.html?configBase=http://coagisweb.cabq.gov/Geocortex/Essentials/geo42/REST/sites/AddressLookup_for_Report/viewers/AddressHTML/virtualdirectory/Resources/Config/Default
But when called from the Visual Studio code with some arguments (including SRWKID, that's when I get the error. Here is the url in the VS code:
'IFrameSrc" value="http://coagisweb.cabq.gov/GeoHtml5/Index.html?configBase=http://coagisweb.cabq.gov/Geocortex/Essentials/geo42/REST/sites/AddressLookup_for_Report/viewers/AddressHTML/virtualdirectory/Resources/Config/Default&layerTheme=AddressReport&runWorkflow=CustomUrlParam&XMapCenter={X}&YMapCenter={Y}&SRWKID={WKID}"/>
The thing is, it used to work, and the code has not changed. Perhaps a Geocortex upgrade created an issue?
Thanks for any assistance,
Mike0 -
Hi Mike,
If you upgraded from Geocortex Essentials 4.4 to 4.5+ recently, then yes the code has changed slightly. I do not know exactly what has changed to cause this issue but you will need to adjust your code to make this work again.
Have you tried using 3857 instead of 102100?
I hope this helps,
Carmen0 -
I would try 3857, but I am not sure how to do that. Do you mean hard code it in VS, in that url:
...&SRWKID={3867}"/>0 -
Hi Mike,
Yes, I would try hardcoding it without the curl braces (like this: ...&SRWKID=3867"/>) just to see if that solves the issue.
Let me know if that works.
Carmen0 -
Thanks Carmen,
I tried that and I get the original error, but now with 3857:
The given value does not represent a valid ArcGIS Server REST JSON format spatial reference. The coordinate system WKT definition is invalid: '3857' is not recognized.
Mike0 -
Hi Mike,
Are you trying to launch the map centered on a certain XY coordinate? If that is the case, then try this notation instead:
http://coagisweb.cabq.gov/GeoHtml5/Index.html?configBase=http://coagisweb.cabq.gov/Geocortex/Essentials/geo42/REST/sites/AddressLookup_for_Report/viewers/AddressHTML/virtualdirectory/Resources/Config/Default¢er=-11867700,4108000,102100
The last section ¢er=x,y,WKID uses our built-in url parameters as described in the HTML Admin Guide and the URL itself works. So it would also work when you enter that into your code.
If you want to run a workflow on startup and those parameters (XMapCenter,YMapCenter,SRWKID) are variables within your workflow, then I would re-evaluate your workflow to perhaps remove the SRWKID. In the workflow, you can use the Get Map Info activity to automatically retrieve the spatial reference. All you need to do is fill in the "spatial reference" parameter with a blank variable. This way, you do not have to worry about the spatial reference at all.
If you are not trying to reproject your map for printing, then you do not need to set the "Target Spatial Reference" parameter. I would try leaving that empty in the workflow to see if that fixes the issue.
Regards,
Carmen0 -
Thanks Carmen,
I ended up using your advice about taking out the spatial reference that was passed to the workflow. The workflow already had a Get Map acitivity that determined the spatial reference, so I am not sure why it was passed to the workflow to begin with. And why it worked for a year and then stopped working. And why the problem was only when using the Print tool, and not when it buffered and zoomed.
Anyway, it works now!
Thanks,
Mike0
Please sign in to leave a comment.
Comments
9 comments