Opened 16 years ago

Closed 15 years ago

#609 closed defect (worksforme)

Layer previews not zooming to extents

Reported by: andrewd Owned by: ksgeograf
Priority: low Milestone:
Component: Maestro Version:
Severity: minor Keywords:
Cc: External ID:

Description

As requested from ticket #592, here's a new one regarding the layer previews...Layer previews (in most cases) don't seem to be zooming out to the full extents of layers. Often I see nothing in the preview, but if I look at the scale / coords, I can see that it's no where near where it should be.

Change History (15)

comment:1 by ksgeograf, 16 years ago

Version: 2.0.1

Ok, that is a little different than what I understood the problem to be before. I thought the problem was that you were setting scale 1:500 and the preview started at 1:10000.

When previewing the layer, Maestro asks the server for the coordinate extents of the featuresource. Some featuresources have multiple coordinate systems, and thus returns multiple extents. Maestro will then pick the first one and use that.

Could that be the issue here?

comment:2 by andrewd, 16 years ago

Well, initially I thought that it could be the fact that some of my layers are set to be displayed only at a certain scale range (all are set to a max of infinity though). It's hard to be sure, since I can't get to the correct spatial location (too far away, unless I spend 10min panning at 1:1000000). Interestingly enough, the one layer that does work in the preview does not have a scale range (or rather, has a default one - so min 0 max infinity). It zooms and centers fine....none of the other do. The zoom is really small, and the location is way, way off.

comment:3 by ksgeograf, 16 years ago

Status: newassigned

I think I will have to add some sort of inspection tool to allow viewing the extents returned before I can fix this. I will look into it.

comment:4 by ksgeograf, 16 years ago

I have looked at the preview code today.

It ask for extents from the featuresource. It is actually the exact same operation that the "Refresh" button performs in the coordinate system override box on the featuresource.

If you press that button, does it give a hint to the problem?

comment:5 by ksgeograf, 16 years ago

In the 1.0.8 version of Maestro, there is now a button to inspect the spatial information. Hope that helps out.

comment:6 by andrewd, 16 years ago

I'm afraid that gives me no clue. The refresh button does what it's supposed to for me. It shows me my coord system overrides, if any. I've (just now) tried looking at the previews again for 4 different layers.

The first layer is a point layer, reading it's point data from an odbc source. When I push the refresh button, nothing happens. When I preview that layer using fusion, the page opens, and fusion just keeps working away - but never shows my layer. When I try it the normal viewer, it opens fine, but the center of the map is on 0,0, and the scale is 1:1.18 - which is very far off....my coords are in the millions, covering several kilometers.

The next layer is of the same type. This one gives me my coord system when I press the refresh button. Same problem with fusion - the indicator just keeps going and going...but nothing happens. Using the normal viewer, I get the same problem as before. It opens to 0,0 @ 1:1.18...My coords are again in the millions.

In both of those cases, I can zoom way out, and eventually see my points.

The other 2 layers I just tried worked fine. Though, I did have to zoom to the proper scale range (those 2 layers were set not to show up until the map was zoomed in to a certain scale). Once I zoomed in, I saw them. It'd be nice if the preview would ignore that scale range...not sure if that's an option though. I think that Studio does the preview a little differently - it zooms/pans to the center of the extents, but then zooms in to the max limit of your scale range...that way, you see your map. In fact, if you try to zoom out beyond your max range, it won't let you.

comment:7 by andrewd, 16 years ago

Where's this new button? I don't see it...

comment:8 by ksgeograf, 16 years ago

It is on the featuresource, on the list with the coordinate system override settings.

comment:9 by andrewd, 16 years ago

I must be blind today - still don't see it. I've got 4 buttons down there - Add, Delete, Edit, Refresh.

comment:10 by ksgeograf, 16 years ago

And you have updated to 1.0.8?

comment:11 by andrewd, 16 years ago

1.0.8.15762. Once you said that, I downloaded the preview (r3216) - but then after that, you posted on the mailing list that there's a real release of it now. So I took off the preview, and put on the release - now I'm at 1.0.8.27399 and I do see the new button!

Ok - so my spatial context info for the layersources that aren't working is as follows:

<?xml version="1.0"?> <FdoSpatialContextList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FdoSpatialContextList-1.0.0.xsd">

<ProviderName />

</FdoSpatialContextList>

Now the question is, why is it blank? Looking at the coord overrides, there IS a difference between the 2 layersources. Oddly enough, if I edit the XML of these 2, the one that works has no <SupplementalSpatialContextInfo>...But I know it's there, because 1) Maestro sees it when I refresh, and 2) The layer works fine.

It looks like the one that works was maybe made with Studio (the override, I mean) and the one that doesn't was made with Maestro. I'm not sure though - but the "source" coord override that doesn't work is named "Oblique_Stereographic", which seems to be what Maestro puts in - the one that works is called "CANST-NB83-CSRS"...the 2 layers do get projected correctly though.

comment:12 by ksgeograf, 16 years ago

When you press "Refresh" Maestro actually reads it from the datasource, so it may not be there. But that may be the problem, if the featuresource has a coordinate system override, the spatial context is not returned.

Does that match your observations?

If so, I will look for an alternative way of reading the spatial context.

comment:13 by andrewd, 16 years ago

All of my layers have an override. Not sure why some work, and some don't...but the problem does seem to have something to do with that.

comment:14 by ksgeograf, 16 years ago

In the newest build (r3558) I have changed how the extent is calculated. It now queries the featuresource for the extent of the actual data, rather than rely on the spatial context.

This should fix this problem. If you try it out please report the outcome.

http://trac.osgeo.org/mapguide/wiki/maestro/Downloads

comment:15 by ksgeograf, 15 years ago

Resolution: worksforme
Status: assignedclosed

No feedback for 6 months, closing. Feel free to reopen.

Note: See TracTickets for help on using tickets.