Opened 13 years ago

Closed 13 years ago

#315 closed defect (fixed)

Exception when using MapMenu widget with commercial layers

Reported by: liuar Owned by: madair
Priority: P2 Milestone: 2.0
Component: Widgets Version: 1.1.1
Severity: Major Keywords:
Cc: Browser: All
External ID: 1273030 Operating System: All
state: New


  1. create two map groups, one contians commercial layer and the other not.
  2. switch map from commercial maps to non-commercial maps using MapMenu widgit.
  3. there will be a invalid argument exception

[NOTE]: it seems the defect is caused by MapOverview widget, so it's better to contain this widget.

Attachments (4)

315.png (32.1 KB ) - added by tomfukushima 13 years ago.
Error message from IE
From_SiteServer_20100217_ticket315.mgp (4.9 KB ) - added by tomfukushima 13 years ago.
Web layout with multiple maps and one with Bing commercial layer
From_SiteServer_20100223_DID 1273030 commercial maps.mgp (3.6 MB ) - added by liuar 13 years ago.
From_SiteServer_20100311_MapMenuDefect.mgp (3.6 MB ) - added by liuar 13 years ago.

Change History (13)

comment:1 by liuar, 13 years ago

Owner: changed from madair to zjames

comment:2 by liuar, 13 years ago

Hi Zak and other experts,

I think this defect is caused by the project transform(coordinate system transform) from EPSG:900913(used by commercial layers) to other(EPSG:4326 which is the default CS in openlayers) failed. Those transform failed occurred at line 18323 and 18406 in OpenLayers.js. Do you have any suggestions on this?

BTW, it seems the projection for overview map is not changed per the MapMenu, is it a defect?


comment:3 by madair, 13 years ago

Owner: changed from zjames to madair

I can get most of this fixed but it seems that commercial layers can't be used in the OverviewMap widget in OpenLayers (see I have spent a few hours looking into the issue but I don't have a fix or even know why that is at this point.

This imposes a few restrictions on the OverviewMap widget when it is used in Fusion, ie. it can only be used with MapGuide, MapServer and WMS layer types, and if a MapGroup ID is not specified in the widget extension, it simply re-uses the main map baselayer. What should happen when the user switches to a commercial layer from the MapMenu in this case?

comment:4 by tomfukushima, 13 years ago

Mike, I don't think that this ticket is about showing commercial layers in the OverviewMap. It seems to be about an error that occurs when switching between maps. I can reproduce the error in IE. Attached is a screen capture of the error. Also, I'll attach a Fusion layout for the Sheboygan sample that can be used to create the error. Just open the layout and click on the "Map" button on the top and switch to Sheboygan1.

by tomfukushima, 13 years ago

Attachment: 315.png added

Error message from IE

by tomfukushima, 13 years ago

Web layout with multiple maps and one with Bing commercial layer

comment:5 by tomfukushima, 13 years ago

It may not be that straightforward to reproduce: you may have to pan a bit before switching maps. Also, I saw another error when I switched from Sheboygan1 back to Sheboygan.

comment:6 by madair, 13 years ago

there is an issue with the AppDef generated by Studio here: the Sheboygan MapDefinition uses the EPSG:4326 (or MG equivalent) and yet the AppDef says EPSG:900913 for the Sheboygan layer. In this case the Bing layer needs to have <sphericalMercator>false</sphericalMercator> in the <Extension><Options> element; The other option is to have the Sheboygan layer served in 900913 and then the sphericalMercator option would be set to true. The issue is that the maxExtent returned by LoadMap is in degrees. ANother option is to convert EPSG:4326 maxExtent from degrees to meters if the sphericalMercator flag is true.

Making that change and then everything works fine with current version of trunk/MG sandbox

comment:7 by madair, 13 years ago

Milestone: Future2.0

comment:8 by madair, 13 years ago

Status: newassigned

at rev 2098 - use consistent handling of projection and units - set a reasonable default value in AppDef.js when parsing the AppDef, but values may be overridden by LoadMap response. Let OL handle setting up it's units/projection via addLayer().

If there are any commercial layers included in the MapGroup, sphericalMercator will be set to true and the projection will be EPSG:3785

comment:9 by madair, 13 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.