Setting default geometry service
Hello,
I would like to set the default geometry service for the HTML5 viewer so that we don't have to change it manually with each new viewer that is spun up. I want to replace esri's http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer with my own geometry url and I have already changed the following config files:
Desktop.json.js
Handheld.json.js
Tablet.json.js
in these two locations:
..\wwwroot\{viewer}\Resources\Config\Default
..\Essentials\Default\REST Elements\Manager\Html5Viewer\Viewer\Resources\Config\Default
However, when I add a new viewer to my site, the esri service is still listed as the Geometry service. Where do I find this?
Thanks in advance.
ilima
-
Hi Ilima,
When you create a new viewer in Manager, it is actually pulling the viewer configuration from the viewer template stored in the ..\ REST Elements\Sites\Templates. In order to change the default geometry service URL, you'll have to open the template and edit the configuration within it in order for that change to take effect for any new viewer you create. The Geocortex.Essentials.Html5Viewer.Template. X.X .vte template file is a zip file, so there are a few ways to accomplish this, but here's perhaps the most straightforward way to do it:
- Make a couple of copies of the vte file. One as a backup that you'll store somewhere safe and another that you'll edit.
- Move the copy you're going to edit to your desktop or some other convenient place and rename it to Geocortex.Essentials.Html5Viewer.Template. X.X .vte.zip (where X.X is the version you currently have).
- Extract that zip file to a folder called Geocortex.Essentials.Html5Viewer.Template. X.X .vte.
- Edit your config files in ..\Geocortex.Essentials.Html5Viewer.Template. X.X .vte\Configuration\VirtualDirectory\Resources\Config\Default\ as you've done previously.
- Zip the Geocortex.Essentials.Html5Viewer.Template. X.X .vte folder back up into a zip file called Geocortex.Essentials.Html5Viewer.Template. X.X .vte.zip. Ensure that the zip file has the following files and folders at its root:
- AppConfig (folder)
- Configuration (folder)
- Export.zip
- ManagementPack.zip
- Template.xml
- Rename the zip file Geocortex.Essentials.Html5Viewer.Template. X.X .vte and copy it back into your ..\REST Elements\Sites\Templates folder, overwriting the previous (already backed-up) template.
Any new viewer should now have your desired geometry service URL -- if you run into any problems, please let me know.
Jordan
0 -
Thank you, Jordan!
Your step by step solution worked. So, I'm presuming that this is something that I'll need to do with each viewer upgrade?
~ilima
0 -
Yes, unfortunately, this is not something that can be upgraded in-place, so you'll have to edit the geometry service URL in any new template you install in Manager.
0
Please sign in to leave a comment.
Comments
3 comments