ThinkGeo.com    |     Documentation    |     Premium Support

Difference between the background and the dynamic layer

Hello,


I have a difference between the background and the dynamic layer. My background is a VirtualEarthLayer and I use InMemoryFeatureLayer for the dynamic layer.


When I draw some features and I try to navigate or zoom in the map, the features didn't move in the same way. It's like there is 2 different projection for the layers.


I use the same configuration in a prototype and I don't have this problem.

Do you have any ideas ?


Thanks.



I have another clue about my problem. This comes from VirtualEarth.



When I put my  mouse on a recognizable item (eg a tree) and I will move the map,  when I release the button of my mouse, this item is no longer aligned  with the mouse.



Pierre-Antoine, 
  
 If I am not misunderstanding anything, I think your problem may lies in the data for your InmemoryFeatureLayer is not in the same projection with VE which is 900913. 
  
 Any more discussion would be appricated. 
  
 Thanks. 
  
 Yale 


Hello Yale,


Thanks for your answer but I've already think about that and it's not this problem. 

I have the same problem when I've only the VirtualEarth layer.



Pierre-Antoine, 


Thanks for your reply and let me know your status, which will save me quite a time to think about itJ. Thanks.
 
Yale

Hello Yale,


To be clear, I've got the same problem as this post : gis.thinkgeo.com/tabid/143/aff/12/a...fault.aspx


This post raises some problem on the web version but I'm on the desktop version.



FYI : I take a look on my prototype and I have a shift too. A little one but it's here.


 


I draw this feature :



 


When I zoom on it :



I have to zoom once again to have the good match.


 


When I pan the map :




Pierre-Antoine,


I am sorry to say that I could not recreate your problem. I tested by change the HowDoI sample TrackAndEditShape sample; the following code is its loading code with accound and password needed.
 
winformsMap1.MapUnit = GeographyUnit.Meter;
winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);

string accountId = "****";
string password = "****";
string clientIpAddress = "66.249.71.109";
string cacheDirectory = @"c:\temp\";
VirtualEarthLayer velayer = new VirtualEarthLayer(accountId, password, clientIpAddress, cacheDirectory);
velayer.MapType = VirtualEarthMapType.AerialWithLabels;
 
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(velayer);
 
winformsMap1.Overlays.Add(layerOverlay);
 
winformsMap1.CurrentExtent = new RectangleShape(-143.4, 109.3, 116.7, -76.3);
winformsMap1.Refresh();


 
 
Following is three screenshot with zoomin and zoomout.
 
So, in your case, just make sure 2 things:
1)      Did you turn off the ZoomLevelSnappingMode from default to none?
2)      How did you generate your inmemoryLayer data, I means the polygon in your screenshot? I did by track a shape along some building, in this way, the tracked out polygon should be in the same projection with the VE. I am not sure your data source from, so I cannot make sure about this point.
 
If you still have problem it would be nice and helpful if you could make a small sample application for me.
 
Thanks.
 
Yale

Pierre-Antoine,


Sorry for missing the screenshots, see following attachments.
 


 
Thanks.
 
Yale


1)      Did you turn off the ZoomLevelSnappingMode from default to none?



Yes



2)      How did you generate your inmemoryLayer data, I means the polygon in your screenshot? I did by track a shape along some building, in this way, the tracked out polygon should be in the same projection with the VE. I am not sure your data source from, so I cannot make sure about this point.



 


The polygon was created by tracking a shape in the trackshapelayer.



Pierre-Antoine,


Thanks for your reply.
 
I think the problem is probably that you turn off the ZoomLevelSnapping Mode . I think up to now the VirtualEarthLayer (or Overlay) and the GoogleLayer( or GoogleOverlay) cannot support  those non-preset zoomlevels. The reason is that these images retrieved from Google server or VE server is just tiled images, it did not support non-preset scales image fetching.
 
Any more questions just feel free to let me know.
 
Thanks.
 
Yale