ThinkGeo.com    |     Documentation    |     Premium Support

Rotation using a Satelitte image background

Rotation using a Satelitte image background.



 



Jpeg2000RasterLayer jpeg2000RasterLayer = new Jpeg2000RasterLayer(jpegFileName);LayerOverlay imageOverlay = new LayerOverlay();FileBitmapTileCache fileBitmapTileCache = new FileBitmapTileCache(cacheDirectory, string.Empty);TileAccessMode.ReadAdd;"JpegImageLayer", jpeg2000RasterLayer);false;

jpeg2000RasterLayer.Open();


winformsMap1.CurrentExtent = jpeg2000RasterLayer.GetBoundingBox();


jpeg2000RasterLayer.Close();


winformsMap1.CurrentScale = zoomLevels[CurrentZoom].Scale;


winformsMap1.ExtentOverlay.MouseWheelMode =


winformsMap1.Refresh();


MapMouseWheelMode.Disabled;

This is how I create and display my background map using a HiRes image. On top of this I have another layer that my vehicles reside in.


They want me to rotate this map instead of rotating the vehicle but the example code you have


uses the mapengine? I dont use the mapengine.  What am I missing? How can i rotate this background.


Thanks,


 Bob



jpeg2000RasterLayer.UpperThreshold = 10000000;


jpeg2000RasterLayer.LowerThreshold = 0;


 


 


fileBitmapTileCache.TileMatrix.TileWidth = 512;


fileBitmapTileCache.TileMatrix.TileHeight = 512;


fileBitmapTileCache.TileAccessMode =


imageOverlay.TileCache = fileBitmapTileCache;


imageOverlay.Layers.Add(


winformsMap1.AdornmentOverlay.ShowLogo =


winformsMap1.Overlays.Add(imageOverlay);



Bob,


I am sorry to say that we could not rotate the Image Raster layer up to now, the rotation can only be applied to FetureLayer up to now.
gis.thinkgeo.com/Support/Dis...fault.aspx
 
Of course, we could do some rotation on the adornments , icons etc.
code.thinkgeo.com/projects/s...ngrotating
 
Sorry for the inconvenience now.
 
Thanks.
 
Yale

Hi Yale, 
 I am rotating the vehicles already Had a need to rotate the satellite image and keep the vehicle fixed. I will just forward the information.

Bob,


Thanks for your feedback.
 
We also have some projects in our code community showing how to rotate small images.
code.thinkgeo.com/projects/show/rotatedimagestyle
code.thinkgeo.com/projects/show/movingvehiclelabel
 
While for the rotation of Raster Image Layer, I am afraid we cannot support it up to now. Sorry for the inconvenience now.
 
Any more questions just feel free to let me know.
 
Thanks.
 
Yale

Yale this is another reason you need to speed up WPF. ;-) 
 It can be done cause I have done it.

Bob, 
  
 That is true; we are planning to focus on the new wpf version after this public release. About the rotating raster image, it is still on our working list, hope we can get it someday. 
  
 Thanks. 
  
 Yale 


If you speed up the WPF version it wont be necessary. What would be helpful is if you payed a great deal of attention to the clipping region so you can paint as effeciently as possible. To rotate I had to oversize the image so it would paint the entire image as you rotate. It is cool but adversley effected by the speed of WPF and the control.

Thank you for your suggestion. Also, would you mind sharing with us the code you use to rotate? Thank you.

Dropped an email to support with what you asked for.

We received the email from you and we thank you very much for sharing the code with us. We will look at it, study it and see if we can use it for a Code Community project. If we are succesfull with it, I will suggest that to the development team.

Val, 
 When you review remember that if the control paid close attention to the clipping region to draw it would speed up the paint. I am not sure if thats possible… I know in a WM_PAINT message it includes the invalidate rectangle which is the clipping. In WPF land I am not sure how things work when it comes to paint/draw for a control.

Ok, thank you for that additional information. I will take that into account.