ThinkGeo.com    |     Documentation    |     Premium Support

Edit shape mode changes position of shapes on map

I have a group of shapes that are drawn against the RenderWorld roads and streams. They are stored as wkt in a database. I create a Dynamic Memory layer and when displayed are in alignment with the roads and streams. But when I go into edit mode (using the code from DrawEditShapes in the VB samples) and they are shifted to the right and when zooming in and out seem to become "unstuck" from the background layers. Any ideas?


Thanks! Cyndi



 


Cyndi,
I am not quite sure what you mean. I mean I have an idea but not exactly sure. Would it be possible for you to respond by posting a few small screen shots with the features drawing first then a second after you go into edit mode with them and any others that show what you mean. Sometimes a picture is worth a thousand words. Also feel free to make the screenshots small just cut outs of your full screen if there is any sensitive information, just enough for me to see the effect. If you have a hard time attaching the pictures to the forum you can e-mail them to support@thinkgeo.com and in the e-mail ask them to be forwarded to Ben & David. I look forward to seeing the screenshots.
As a side note sorry for the C# code in my other post, I didn’t know you worked in VB.NET. We will try to write our samples to you in VB.NET. In the future if I don’t answer the post just leave a note in the post that VB.NET code is preferable. It keeps us sharp to switch around between C# and VB.NET.
David

Here is an example - there are most probably 10 shapes in the Dynamic layer I'm converting to the "Edit Layer". They are all appear to be moving together. Another piece to the puzzle is when I do an update (per the DrawEditShapes I'm getting an error "There was an error deserializing the object of type ThinkGeo.MapSuite.WebEdition.JsonFeatureCollection. End element 'Value' from namespace '' expected. Found element 'Key' from namespace ''.


(PS - I don't have any problems with the DrawEditShapes demo)
(PPS - I live in both worlds C# and VB - so I have to be a bit "schizo" in my code reading abilities.)
 

56-before_edit_mode.png (18.5 KB)
57-after_edit_mode.png (17.7 KB)

Cyndi,


 I couldn’t recreate your issue. Attached is my test app which draws an InMemoryLayer from WKT, I can edit and submit the shapes without any problems. Can you have a look at that to see what the difference with your code is?  If the problem till exists, can you send us the exact code of your app?
 
Please make sure you are using the latest public release (Web Edition 3.0.2, MapSuiteCore 3.0.2, NetTopologySuite 1.7.1.2781).

BTW, I didn't attache the data for the demo as it exceeds the file max size.  You can find it in the following folder if you installed web edition.


C:\Program Files\ThinkGeo\Map Suite Web Full Edition 3.0 (Beta)\Samples\VB Samples\SampleData\USA\Austin


Ben.



58-ShapesUnStuckForCyndi.JPG (86.6 KB)
59-ShapesUnStuckForCyndi.zip (16.6 KB)

That infact works - I modified your example appliction to use data from my application and it works also.


I copied two of the wkt definitions from my application and added them the the application, got the background data from RenderMap. I'm editing and submitting the changes just fine!


I'm going to continue adding information to the DynamicLayer from my application to find the problem. Let you know when I find something!


Thanks for the quick response! Cyndi



Cyndi, 



Hope you have a great app with Map Suite and sure, let us know for any queries.  



Ben



Cyndi, 
  
   An update on your issue.  We had a issue similar from another client and it had to do with them putting the map control into a DIV or TABLE and then having a center alignment on the DIV or cell.  Maybe you had that and when you switched to our code we didnt.  In any event if the issue come back after you apply some CSS or other styles you can try the code below.  Just modify the map controls HTML so that you add the style="text-align:left".  See the example below.  This fixes the problem of it being in a DIV or TABLE with the center set.  In the next beta version we will automaticly include this tag when you create the map control.  Until then you need to add it manually. 
  
 The best way to solve it is adding the “textAlign: Left” style to map control, as following.  
  < cc1:Map ID=”Map1” runat=”server” height=”477px” width=”729px” style=”text-align:left” > 
  
 This is from another post but I thought it might help you. 
  
 David