Opened 11 years ago

Closed 11 years ago

#592 closed enhancement (fixed)

Layer preview

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


It would be great if you could add a layer preview (optional, of course - since that can slow things down in some cases). This is another feature that Autodesk's Studio has, and another that I miss when I'm using Maestro. Basically, the ability to preview every sort of item (data connections, layers, maps, fusion layouts, web layouts) would be a great tool. I see there's a "Preview" button in the toolbar up top, but it does nothing for me.

Change History (15)

comment:1 Changed 11 years ago by ksgeograf

Status: newassigned

Yes, I use that feature extensively. I think MapGuide Studio is just activating a preview form that is avalible in the regular MapGuide installation. If that is so, it should be very easy to implement this.

If it works, I will make the preview appear in a new browser, rather than being embedded in the application.

Thank you for the request.

comment:2 Changed 11 years ago by jbirch

I believe that it may be as simple as creating a session-based map that contains the layer, and then pointing the preview template at that map.

comment:3 Changed 11 years ago by ksgeograf

I was thinking of Feature Source preview, the layer preview is actually very simple, as Jason pointed out.

comment:4 Changed 11 years ago by ksgeograf

Version: 2.0.1

comment:5 Changed 11 years ago by jbirch

The feature source preview probably isn't all that hard either. I believe that it was built to be shared by all clients:


comment:6 Changed 11 years ago by tomfukushima

This should help you get started with the schema report; the request should look like: siteURL + "/schemareport/describeschema.php" + "?viewer=" + (layouttype ? "basic" : "flexible") + "&resId=" + resid + "&sessionId=" + sessId + "&schemaName=&className=";

comment:7 Changed 11 years ago by ksgeograf

Resolution: fixed
Status: assignedclosed

Thanks for that url Tom, it saved me some work.

Maestro now has preview for feature source, layer, map, weblayout and fusion application.

comment:8 Changed 11 years ago by jbirch

Kenneth, would it be possible to add an option to preview the layer/map in the Fusion preview template?

I'm planning to remove the ajax, etc, mapviewers from my production machine.

comment:9 Changed 11 years ago by ksgeograf

Resolution: fixed
Status: closedreopened

Yes. The previews I make could easily be changed to Fusion, and it looks like the schema report supports fusion as well.

I have to construct an options dialog first.

comment:10 Changed 11 years ago by ksgeograf

Resolution: fixed
Status: reopenedclosed

I have now added a preferences dialog. You can choose browser and viewer type there. When the installer is built for the next version, it will place two files "Preview layout.WebLayout?" and "Preview layout.ApplicationDefinition?". The user can then replace those with a custom version. If they are not present, Maestro will use an internal version.

If you are eager to replace the built in version with your own before the installer is complete, you can copy one in, and name it as above.

comment:11 Changed 11 years ago by ksgeograf

I have adde a preview build of the installer and binaries on the regular download page (scroll down):

comment:12 Changed 11 years ago by andrewd

Resolution: fixed
Status: closedreopened

Thanks so much for adding that preview link!! For a project like this, having access to the latest builds is pretty important. Now, I've just tried out the preview for a few layers - here's what happens:

data connections -> these work fine.

layers -> fusion previews don't work. I always get an error (no matter what layer I try): "Failed while creating map preview: There is an error in XML document (2,2)."

The Regular method works in some cases, but not all. One problem is definitely scale ranges. If I preview a layer that's got scale ranges, it needs to either ignore those ranges in the preview, or else start the preview at the first scale. If I zoom out far enough, my layer does appear in the legend - but isn't anywhere to be found in the map area. The preview should really try to zoom to the extents of the layer.

My raster layers are working - though they have the same scale range problem...

I have a point layer that reads it's data from a database (DSN) - this layer doesn't work. It's got no special scale ranges - so I'm not sure why it doesn't show up in the preview...

comment:13 Changed 11 years ago by ksgeograf

Resolution: fixed
Status: reopenedclosed

Yes, there is an error related to reading the fusion template. Just delete the file "Preview layout.ApplicationDefinition?" and it should work.

The preview reads out the extent that the datasource reports to have, and zooms to that. I can see that might be a bit confusing, because you have to zoom in to actually see something.

Can you open up the scale problem/point problem as a new issue?

comment:14 Changed 11 years ago by ksgeograf

Resolution: fixed
Status: closedreopened

Well... Deleting the file makes the installer complain that the installation is broken.

comment:15 Changed 11 years ago by ksgeograf

Resolution: fixed
Status: reopenedclosed

I have put up a new installer (r3216).

Note: See TracTickets for help on using tickets.