Initial Extent
I can't set the intial extent unless I remove the 3 tiled map services that contain imagery. I've tried adding them back in after I've set the initial extent but it throws the settings out of whack. All of my data uses the same spatial reference . I'm not sure if this is a GE issue or an ArcGIS Server/caching issue...any thoughts?
-
Hi Jared, have you tried adding the tiled service first, other services and then set your initial map extent?
Rx
0 -
Hi Rex,
Thanks for the suggestion, however, I still can not get the initial extent to work when the imagery tiled map service is included in the site. It works without the tiled map service. The initial extent also works with the Silverlight viewer when the imagery is included within the site.
Jared
0 -
I think I've replicated this issue... I added a tile service and as soon the vector service is added nothing is displayed. This was on 3.13.0. I then hoped onto another machine with 3.12.0 - same tile service and vector service, no problem! Can someone please confirm if this is a bug on 3.13.0?
0 -
Can Latitude confirm if this issue will be resolved in the coming release of 1.3? As I mentioned before, my HTML5 viewer will not honor the initial extent when I use our cached imagery service. The service works fine with the Silverlight Viewer, but when I launch the site with the HTML5 viewer, the initial extent is zoomed out to a small scale.
Jared
0 -
+1
0 -
+2
Silverlight viewer works fine but HTML5 does not!
The center of our tiled map services in in the ocean so this is very confusing for users.
0 -
I've had similar issues, but currently am able to have a single cached service in 1.2. Sometimes I had to play with the order that I added the services. When I tried to add a second dynamic service, it caused the same issue. But here is an example of a single dynamic and a single cached service working, so it is possible...
http://agsmaps.ci.santa-rosa.ca.us/Html5Viewer/Index.html?viewer=PublicHtml5
0 -
Hi folks, Really quickly: if you add a tiled service with a different spatial reference to your site, the site's spatial reference will change to that of your tiled service, but the initial and full extent coordinates will not be updated, so you'll likely find your map suddenly displays a completely different part of the world or no map at all, depending on whether the old coordinates are valid in the new spatial reference. For instance, if your original spatial reference was GCS WGS84 (using lat and long) and your new one is Web Mercator Auxiliary Sphere (used by Google, ArcGIS Online, and Bing), you'll find your new intial extent is in the Atlantic off the coast of western Africa. If you were to go from Web Mercator to GCS WGS84, you'd probably get a blank (white) map, because Web Mercator coordinates are usually larger than is valid for latitude and longitude. So if you add a new tiled service to your site and the spatial reference of your site changes, you will have to correct the initial and full extents manually. I've filed an improvement for Essentials to reproject these extents when the spatial reference changes. Hopefully, that's something we can get into an upcoming release. Now, I wasn't able to reproduce what it sounds like you're seeing here -- I only see the issue described above. In the event that the initial extent is no longer valid, Manager, the Silverlight Viewer, and the HTML5 Viewer all display the same thing for me. Can you perhaps walk me through it a little more? Something along the lines of: - I create a new site with a dynamic service with a WKID or WKT of A . - My initial extent is: x1 , y1 , x2 , y2 - I add a Silverlight and HTML5 Viewer to the site and the map looks correct in both viewers. - I add a new tiled service with a WKID or WKT of B . - My initial extent is still x1 , y1 , x2 , y2 . - In the map preview in Manager, I see... my old initial extent? some new part of the world? a blank (white) map? John Malkovich? - In the Silverlight Viewer, I see... _ If I click on the "I want to..." button and select "Share current map", the URL is... - In the HTML5 Viewer, I see... Thanks! 0 -
It has been awhile, since I played with it, but I only use my own services, and they are all in the same coordinate system. I have one project that I'm working on now that has a cached service and a dynamic service, along with two feature layers. When I try to add the map service associated with the two feature layers, one of the feature layers gets moved to the bottom of the stack, and the cached service disappears. I just tried it again, and same thing.
0 -
Jordan,
I opened a support case back in March regarding this behavior, however, I did not receive a resolution. I demonstrated to Support that this was not an issue with the HTML5 1.1 version.
Please contact me if you would like me to illustrate this issue.
Jared
0 -
Hi Jared,
I've taken on the support case created in March and see that this issue did get logged with the development team at that time. I want to assure you this issue is in front of development and will keep you informed as it progresses via the support ticket (and this forum thread for those following the case here.)
regards,
Edmond
0 -
Just an update for everyone, the issue here was identified to be that the initial extent was not respected in the HTML5 Viewer for cached services whose spatial references were defined using a WKT. This bug has been fixed for version 1.3 of the HTML5 Viewer.
-Victoria
0 -
Has anyone found a solution to this issue? I can't set initial extent or full extent! It's very frustrating!
0 -
Hi Rebecca,
It looks like the RDOS services are using WKTs (I peeked), so you'd definitely see this issue with an older HTML5 Viewer (1.2 or earlier), but you shouldn't see this with 1.3 or up. What version are you using currently?
Cheers,
Jordan
0 -
~~Hi Jordan,
We're using HTML5 Viewer v2.0. Is it an issue with the viewer or the site? And what's a WKT? This is all new for me so I'm trying my best to muddle through :)
Rebecca
0 -
It's not publicly accessible yet, unfortunately. If the WKT was created in a previous version could that be having an affect?
0 -
I'm using 2.3.2, and it still disrespects the Initial Extent specified in Manager as you can see (https://maps.brucecounty.on.ca/GE4HTML5viewer/Index.html?configBase=https://maps.brucecounty.on.ca/Geocortex/Essentials/GE42/REST/sites/Bruce_County_Maps/viewers/Bruce_HTML_5_Viewer/virtualdirectory/Resources/Config/Default) here . If I append an extent parameter to the URL such as I have done (https://maps.brucecounty.on.ca/GE4HTML5viewer/Index.html?configBase=https://maps.brucecounty.on.ca/Geocortex/Essentials/GE42/REST/sites/Bruce_County_Maps/viewers/Bruce_HTML_5_Viewer/virtualdirectory/Resources/Config/Default&extent=397298.74,4841582.75,620228.21,5021126.81) here , upon the URL finishing to load in Internet Explorer , the extent at first seems to have been dishonoured. However by changing the Base Maps menu to either Air Photo, it is clear the extent is honoured, but perhaps only for that air photo. But by then turning on and off the other map services in the Map Layers list, each one redraws to fit the extent given in the URL.
In Chrome the behaviour is different. There, the URL extent parameter is completely ignored, and turning things on and off in the Map Layers list makes no difference.
So right now, both with and without the "extent" parameter in the URL, the viewer's behaviour is unacceptable. Has anyone else experienced this with theirs? What solution have you found? I need a fix, please!
Thanks in advance,
0 -
I am still experiencing this issue in HTML 2.2.1 - the initial extent is ignored.
Is there a solution?
0 -
Are you using cached basemaps. I had the same trouble when we first deployed GC last year at version 3.15 of Essentials. At the recommendation of GC support, I cached my basemap services at 2 additional levels out and this totally resolved the initial extend problem for me across all viewers. After revising the cached basemaps, the viewers respect the initial extent set in Essentials. The cost in disk space was insignificant for those 2 additonal cache scales. Maybe worth a try is you are using cached basemaps.
0 -
Hi Erick
All my services are dynamic, we do not have any cached services and are still experiencing the extent issue.
When I first load my map, the extent is way off.
If I press Intial View button once, it takes me to the correct extent, if I press it again it moves it to somewhere wacky again. Same with Full Extent.
Please advise.
0 -
Hi Justin and Cathy,
We apologize for the inconvenience this has caused you. We've identified the issue and have fixed it for our 2.4 release. For your records, he issue number in our system is GVH-4478 .
Sarshad
0 -
Thank-you.
As my interim solution I have setup a startup workflow that sets the extent.
0 -
Hmmm, I'm using GVH 2.4.1 and still experiencing this issue. My site was functioning perfectly fine, then I re-ordered the map services (dragged one above another) and it threw the intial extent off. Despite my attempt to reset it, it still loads zoomed in way too far to the middle of nowhere. When I click the intial view button it returns it to what the correct initial extent should be. Any suggestions? Here's the (unshortened) URL: http://maps.rdos.bc.ca/Html5Viewer241/Index.html?configBase=http://maps.rdos.bc.ca/Geocortex/Essentials/REST/sites/Public_Parcels_HTML/viewers/Public_HTML5/virtualdirectory/Resources/Config/Default
0 -
We were also having this issue when moving from GVH 2.5 to 2.6. We have a large number of sites so we wanted to avoid adding a workflow on start. A custom module could also be used for this fix. Since this behavior is the same on all our sites we just placed this fix in the html index file for the new 2.6 viewer. // To load external css or javascript files in your project add the URL for each resource to this array var resources = ["./Resources/Styles/Custom/Desktop.css"]; //This catches the site initialized event var viewerInitOptions = { "onSiteInitialized": SiteLoaded }; var loader = new geocortex.essentialsHtmlViewer.ViewerLoader(); loader.resourceSet.find("dependencies").prepend(resources); loader.loadAndInitialize(viewerInitOptions); //The site is loaded, now what? function SiteLoaded() { if (geocortex == null) return; //Get the application (the viewer) var app = geocortex.framework.applications[0]; //Geocortex does set an extent, but it doesn't match what is in the manager. So we catch that event ONCE. app.eventRegistry.event("MapExtentChangedEvent").once(null, DoInitialExtent); } function DoInitialExtent() { var app = geocortex.framework.applications[0]; if (app == null) return; //For some reason calling the initial extent command does produce the same extent shown in the manager. app.command("ZoomToInitialExtent").execute(); }
0 -
Hi Tyson, Thank you for sharing your script. It works great, but I am getting an error on startup: DOJO Loader Error. Is there something I need to do to eliminate this error? 0 -
Hi Barbara, 0 -
Another option is to use a custom module. This method is a bit blunt but it does work in 2.8. Here are the key parts for your custom module. initialize(config: any): void { var site: geocortex.essentials.Site = (<any>this).app.site; if (site && site.isInitialized) { this._onSiteInitialized(site); } else { this.app.eventRegistry.event("MapLoadedEvent").subscribe(this, (args) => { this._onMapLoaded(args); }); this.app.eventRegistry.event("SiteInitializedEvent").subscribe(this, (args) => { this._onSiteInitialized(args); }); } } _onMapLoaded(site: geocortex.essentials.Site) { this.app.command("ZoomToInitialExtent").execute(); } _onSiteInitialized(site: geocortex.essentials.Site) { this.app.command("ZoomToInitialExtent").execute(); }
In the shell config file add the module.{ "moduleName": "InitialExtent", "moduleType": "oe.initial_extent.InitialExtentModule", "libraryId": "Custom", "configuration": {} },
0
Please sign in to leave a comment.
Comments
27 comments