[mapguide-users] Problems adding polygon to temporary layer

nikp nik.peters at atkinsglobal.com
Mon Sep 10 05:54:51 EDT 2007


I know the map is visible on the map (Well, at least it was set to visible
programmatically!). I also know the layer IS being added to the map, as it
shows up in the TOC list on the left of the map. I have also tried turning
all the other layers off (making them invisible) to see if it were the issue
of them being below other layers, and the polygons still didn't show up.

So, I guess that the issue is either 1. or 3.


Kenneth, GEOGRAF A/S wrote:
> 
> There are a copule of common reasons for that:
> 1. The layer in the map is not referencing the temporary featuresource, 
> but the permanent
> 2. The layer is not visible in the map
> 3. The layer is out of scale range
> 4. The layer is below another visible layer
> 
> My guess is that you have hit #1.
> When you create the temporary resource, you must also create a copy of 
> the layer,
> and update the layers featuresource to point at the temporary
> featuresource.
> 
> So, steps are:
> 1. Get layerdefinition
> 2. Update the resourceid of the featuresource to match the temporary 
> featuresource
> 3. Save the updated layer definition
> 4. Change the runtime map to use the newly created temporary layer
> resource.
> 
> Hope that helps.
> 
> Regards, Kenneth, GEOGRAF A/S
> 
> 
> 
> nikp skrev:
>> Hi all, first post and new time user to Mapguide, so go gently please!
>>
>> Basically, my goal is to digitize a polygon and once complete I want to
>> display the digitized polygon on the map. The problem being this needs to
>> be
>> on a per user, per polygon basis. (In other words, each user using the
>> system should only see their polygon they have just created).
>>
>> My thought to complete this task was to create a temporary layer and add
>> the
>> polygon to that layer. The code I have used originated from a MapGuide
>> course that I went on. The problem is that the code appears to work in
>> that
>> there are no exceptions thrown, but the polygon is not displayed on the
>> map.
>> If I change the code so that the polygon is added to a permanent layer
>> the
>> polygon is added and displayed correctly.
>>
>> What am I doing wrong?
>>
>> (I can add my code if people need to see what I'm doing)
>>
>> (Software I'm using is MapGuide open source ver. 1.2, and visual studio
>> 2005
>> and C#/.NET platform version 2.0)
>>   
> _______________________________________________
> 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/Problems-adding-polygon-to-temporary-layer-tf4413159s16610.html#a12589784
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list