[mapguide-users] Changing Visibility for one layer affects others
nclayton
nclayton at gmail.com
Tue Jan 22 11:25:50 EST 2008
The issue is deeper than I first thought. I opened up Fiddler and see that
once the raster layer is turned on, I am getting "SDF connect failed. File
does not exist or cannot be opened in specified access mode." back from
mapagent.fcgi
I look on the server and the folder containing the sdf files has a gray
checkmark for Read Only. I uncheck this, pan the map a little to cause a
refresh and get the same error message in the response and the checkmark is
back.
Here is what I am getting from Fiddler:
Request:
===============================================================================
POST /mapguide/mapagent/mapagent.fcgi HTTP/1.1
Accept: */*
Accept-Language: en-us
Referer:
http://www.tscmaps.com/mapguide/mapviewer/mapframe.php?MAPDEFINITION=Library%3A%2F%2Fms%2Flee%2Fmap%2Fcounty.MapDefinition&TYPE=HTML&SHOWLEGEND=0&SHOWPROP=0&INFOWIDTH=0&LOCALE=en&HLTGT=1&HLTGTNAME=&SHOWSLIDER=0&SESSION=daf1cef8-ffff-ffff-8000-00e0183afc15_en_4B5F050B0AFC0AFB0AFA
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
Host: www.tscmaps.com
Content-Length: 624
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cookie: treemenu=0,1,2,3; ASPSESSIONIDSATSQCAD=JAHJGOPCOPODJHHDKILNACLM
OPERATION=QUERYMAPFEATURES&VERSION=1.0.0&PERSIST=0&MAPNAME=county&SESSION=daf1cef8-ffff-ffff-8000-00e0183afc15_en_4B5F050B0AFC0AFB0AFA&SEQ=0.8564969102084472&LAYERNAMES=countyln%2CCOVTWPRNGTXT%2CCOVCITYNAMES%2CCOVMAJORROADS%2Ccov_area%2Ctwprngln%2Ccov_rdsym%2Ccovrds%2Ccovctylimits%2Ccenterln%2Croadln%2Cpropertyln%2Cpickedpgn%2Cparcels%2Caerial&GEOMETRY=POLYGON((1007159.2419184027
1715230.3331293403, 1007167.9224565971 1715230.3331293403,
1007167.9224565971 1715221.6525911458, 1007159.2419184027
1715221.6525911458, 1007159.2419184027
1715230.3331293403))&SELECTIONVARIANT=INTERSECTS&MAXFEATURES=1&LAYERATTRIBUTEFILTER=5
Response:
===============================================================================
HTTP/1.1 559 MgFdoException
Connection: close
Date: Tue, 22 Jan 2008 16:16:26 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Status: 559 MgFdoException
Content-type: text/html
<html>
<head>
<title>MgFdoException</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<h2>An exception occurred in FDO component.
SDF connect failed. File does not exist or cannot be opened in specified
access mode. </h2>
An exception occurred in FDO component.
SDF connect failed. File does not exist or cannot be opened in specified
access mode.
Exception occurred in method MgFdoConnectionManager.Open at line 979 in file
c:\build_bond_area\mapguide_open_source_v1.2\build_18.1\mgdev\server\src\common\manager\FdoConnectionManager.cpp
</body>
</html>
-----
nclayton wrote:
>
> A little more info on the situation...if I toggle the raster layer on
> while I am outside of its visibility range, the other layers are still
> visible. Once I get within range and the raster layer is displayed, I lose
> my other layers. Except for a couple of text layers.
>
> After this point, the layers are not visible again until I begin a new
> session.
>
>
>
> nclayton wrote:
>>
>> It is at the very bottom of the drawing stack. The layer is pulling from
>> an aliased folder on the server and contains 595 ecw files. I'm not sure
>> if that could be a factor in this issue, especially since the layers do
>> not return once the raster layer is set to no longer be visible.
>>
>>
>>
>> andrew.demerchant wrote:
>>>
>>> Without looking at your code, I'm wondering if maybe your raster image
>>> layer is above your other layers. I'd check your layer ordering. I know
>>> how to do that in Mapguide Studio or Web Studio, but not so sure using
>>> code.
>>>
>>> Andrew
>>>
>>>
>>> nclayton wrote:
>>>> Hi all,
>>>> I am trying to add functionality to toggle raster images on and off to
>>>> my
>>>> map. I have the raster images on a layer called aerial. I am calling a
>>>> php
>>>> page with the following function call in the scriptFrame:
>>>>
>>>> toggleLayer($sessionId,$mapName,"aerial");
>>>>
>>>> The function is:
>>>>
>>>> function toggleLayer($sessId,$mapName,$layerName){
>>>> try{
>>>> $userInfo = new MgUserInformation($sessId);
>>>> $siteConnection = new MgSiteConnection();
>>>> $siteConnection->Open($userInfo);
>>>> $ressvc =
>>>> $siteConnection->CreateService(MgServiceType::ResourceService);
>>>> $map = new MgMap();
>>>> $map->Open($ressvc,$mapName);
>>>> $tlyr = $map->GetLayers()->GetItem($layerName);
>>>> $tlyr->SetVisible(!($tlyr->GetVisible()));
>>>> $map->Save($ressvc);
>>>> }catch(Exception $e){
>>>>
>>>> }
>>>> }
>>>>
>>>> This is causing the layer to become visible, but it is also causing
>>>> other
>>>> layers to not be visible.
>>>> I've made a page with images showing what is happening, and it is
>>>> located
>>>> at:
>>>>
>>>> http://www.tscmaps.com/issue.htm http://www.tscmaps.com/issue.htm
>>>>
>>>> Thank you for your help
>>>>
>>>>
>>>
>>> --
>>> *Andrew DeMerchant*
>>> *Computer Technologist*
>>> ph.1-877-2GEMTEC x.163
>>> fax 506-453-9470
>>>
>>> /GEMTEC Limited <http://www.gemtec.ca>
>>> /191 Doak Road
>>> Fredericton, NB, Canada
>>> E3C 2E6
>>>
>>>
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Changing-Visibility-for-one-layer-affects-others-tp15021169s16610p15022245.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list