Ticket #319 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

Issues with Multiple Maps Within a MapGroup

Reported by: tnolte Owned by: tnolte
Priority: P1 Milestone:
Component: MapServer Version: 2.0 - beta
Severity: Major Keywords: mapserver, mapgroup, legend
Cc: christinebao, arthur.liu@… External ID:
state: Analysis Requested Browser: All
Operating System: All

Description

Found multiple issues with both the Legend and the Map image ordering when using multiple maps in a MapGroup?. Updates added to ticket #131 also as changes needed to be made to the sprite usage process as well.

Change History

Changed 4 years ago by tnolte

  • status changed from new to assigned

Made required changes to the MapServer LoadScaleRanges? & LegendIcon? scripts to handled multiple maps within a MapGroup? properly. Also updated the widget Legend.js file to also properly build up the legend.

Changed 4 years ago by tnolte

  • state changed from New to Review

Commited changes to Legend.js widget script. Will need to be reviewed to make sure that it doesn't break MapGuide.

Changed 4 years ago by tnolte

Was able to track down an OpenLayers API that allows for changing the z-index of an OpenLayer?'s layer(Fusion Map). I have implemented the changes in fusion/lib/Map.js and fusion/layers/MapServer/MapServer.js. The next step is to see how this should be implemented in MapGuide.js as well as Generic.js. The fix was a simple matter of passing the MapGroup? index into the Fusion.Layers.MapServer class and setting up a global nMapIndex for this. The final call used to set the layer(Map) z-index is:

this.mapWidget.oMapOL.setLayerZIndex(this.oLayerOL,this.nMapIndex);

Changed 4 years ago by tnolte

I have applied this z-index fix to MapGuide.js as well as Generic.js. Waiting for any responses on this issue as far as MapGuide are concerned.

Changed 4 years ago by tnolte

Was able to also address a related issue with how the Legend was being built when including multiple Maps in a MapGroup?. The MapServer layer groups where getting added in reverse order. This was fixed by modifying the fusion/lib/Map.js file to look for whether the Map was of type 'MapServer' and passing to the addGroup call the directive to reverse the layers. This reverse functionality was already built but wasn't being used at the top level.

Changed 4 years ago by tnolte

  • state changed from Review to Analysis Requested

Another issue related to Multiple Maps was the Query/Selection? functionality. I was able to update the relevant code in SelectionPanel?.js, layers/MapServer/php/Query.php, and layers/MapServer/php/Selection.php. I was able to get this working for multiple MapServer maps, however in reverting my ApplicationDefinition back to a single MapServer map the MapServer cgi is reporting "msQueryByShape(): Search returned no results. No matching record(s) found." when loading the map image using the created query.qy file. So Query.php is working as it should and the Selection Panel is even loading up the query results. The query file looks exactly the same whether generated with a single combined mapfile or broken out into multiple stacked mapfiles. My development server is running the latest MapServer 5.6 beta release so I'm not sure if this is somehow the cause of my problems. Seems like more of a problem with MapServer not Fusion.

Changed 4 years ago by tomfukushima

  • cc christinebao added

Christine, could you get someone to check this in MapGuide?

Changed 4 years ago by christinebao

  • cc arthur.liu@… added

Thank you Tom for reminder. Arthur is going to verify this in MapGuide.

Changed 3 years ago by madair

  • status changed from assigned to closed
  • resolution set to fixed
  • milestone changed from 2.0 to 2.1

is this still an issue? from the comments it sounds like this is fixed so closing the issue. If that is incorrect please re-open

Changed 3 years ago by madair

  • milestone 2.1 deleted

Milestone 2.1 deleted

Note: See TracTickets for help on using tickets.