[mapguide-users] Exception when setting layer Visibility

2019-02-06 Thread frieda
Hello, I need help to understand the purpose of the following codeblock.

I have MapGuide Server 2.5.2 Final installed on IIS in Windows 10 64 bit.
The function is for printing the map in pdf or word document.
--
Private Sub printButton_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles btnPrint.Click

Dim objUtilties As New
CCommonFunctions(Request.ServerVariables("SCRIPT_NAME"))

If Not m_objMGC.IsPlotBoxDrawn(m_objMapGuide) Then
AddJavaScript("Print", "alert('No Plotbox');")
Exit Sub
End If

Dim changedLayers As ArrayList = PrepareMapForPrinting()

Try
Scale = DetermineScale(Me.cboScale.SelectedValue)
Dim ViewScale As Double = Scale

If Me.cboScale.SelectedValue.Contains("current") Then
Scale /= ScaleDistortion
End If

Dim DPI As Integer =
g_objObjHandl.NZ_Int(Me.cboDPI.SelectedValue)

Dim objMapDraw As New MapGuideDrawing(m_objUser,
m_objUser.Project.DocumentFolder)
objMapDraw.DPI = DPI
objMapDraw.RegKeyPath = Application("APP_REG_PATH")

Dim MapSize() As Double =
objMapDraw.DetermineMapExtent(Me.cboPageSize.SelectedValue,
Me.rbQuer.Checked, 0.90002)

objMapDraw.InitializeMapImage(m_objMapGuide,
m_objMGC.GetPlotBox(m_objMapGuide, "(TYPE=1)", False), MapSize(0),
MapSize(1))
objMapDraw.InitializeLegendImage(m_objMapGuide,
Session("PRINTOPT")(0))
Dim MergedImage As Drawing.Image =
objMapDraw.MergeImages(m_objMapGuide.Map.Name, ViewScale,
g_objObjHandl.NZ_Boolean(Me.hdfLegend.Value), Session("PRINTOPT"))
Dim fileDir As String = objMapDraw.CreateDocument(m_objMapGuide,
MergedImage, Me.cboPageSize.SelectedValue, Me.rbQuer.Checked,
Me.cboDownload.SelectedValue)

objUtilties.DownloadFile(Me.Form, fileDir)

Catch ex As Exception
m_objUser.WriteError(ex, "")
AddJavaScript("PrintError", "alert('" & ex.Message & "');")
Finally
If changedLayers Is Nothing = False Then
RepairMapAfterPrinting(changedLayers)
End Try
End Sub
--
I get an Exception in the "RepairMapAfterPrinting"
--
Sub RepairMapAfterPrinting(ByVal pv_arrChangedLayers As ArrayList)

Dim Visibility As Boolean
Dim objMapGuide As FRIEDAcom.MapGuide = CType(m_objMapGuide,
FRIEDAcom.MapGuide)

objMapGuide.ConnectMapGuide(objMapGuide.SessionID,
Session("GRAPHIC").Project)

For Each layer As OSGeo.MapGuide.MgLayer In pv_arrChangedLayers
Visibility = layer.IsVisible()
layer.SetVisible(Not Visibility)
Next
End Sub
---
The Exception occurs here: Visibility = layer.IsVisible(). When I change it
to Visibility = layer.GetVisible(), the exception occurs in
layer.SetVisible(Not Visibility).
It's not my code and I don't really understand what's going on.

The Exception:
OSGeo.MapGuide.SWIGExceptionHelper.ThrowCustomException(String className,
IntPtr cptr) +494
   OSGeo.MapGuide.PlatformBaseApiPINVOKE.MgLayerBase_SetVisible(IntPtr
jarg1, Boolean jarg2) +0
   OSGeo.MapGuide.MgLayerBase.SetVisible(Boolean visible) +13



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

[mapguide-users] RAM problem

2019-02-06 Thread Roberto Lombardini
We are currently managing a GIS web application running on mapguide server
2.5
installed over a Windows Server instance with 14 cores running at 2.6 Ghz
and 21Gb of ram. 

We have 2 projects on the server, with around 10 maps active, each with 80
layers.

Lately we are forced to restart the Mapguide service 2/3 times a day because
it keep allocating ram without releasing it. This is not a problem until it
gets around 5.5/6.5 GB of allocated ram but after that point the
performances seriously degrade until it gets unusable (20 to 50 sec to get a
tile).

Do you have any suggestion on which could be the problem?
Do you know how can we analyze this issue?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

[mapguide-users] Probelem regarding group folder in fusion legend

2019-02-06 Thread farman
Hi all respected mailing list members,
I am facing a problem regarding group layers folder in fusion weblayout.
when I uncheck group folder its corresponding layers didn't uncheck but
layers on map hide, and when I uncheck all layers one by one and then check
group folder layers didn't check. And also if I uncheck group folder then
check/uncheck layers individually no data show on map. Here are two
screenshots  
 
I am using mapguide 3.1.1 with fusion-3.1.2-test on windows 10. 



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users