POST
|
Hello, I start porting an application developed in v10.2.7 to v100.2 and the operation is not done without some difficulties. There, I just discovered that the use of PictureMarkerSymbol from an image created on the fly no longer works if we use a BMP bitmap (no error but PictureMarkerSymbol does not appear on the map) but I have solved the problem using a PNG instead. Example: System.Drawing.Bitmap bm = new System.Drawing.Bitmap(100, 50); System.Drawing.Graphics gra = System.Drawing.Graphics.FromImage(bm); gra.FillRectangle(System.Drawing.Brushes.Orange, 0, 0, bm.Width / 2, bm.Height); gra.FillRectangle(System.Drawing.Brushes.Magenta, bm.Width / 2, 0, bm.Width / 2, bm.Height); var s = gra.MeasureString("Test", new System.Drawing.Font("Tahoma", 24, System.Drawing.FontStyle.Bold)); gra.DrawString("Test", new System.Drawing.Font("Tahoma", 24, System.Drawing.FontStyle.Bold), System.Drawing.Brushes.White, (bm.Width - s.Width) / 2, (bm.Height - s.Height) / 2); gra.Flush(); MemoryStream ms = new MemoryStream(); bm.Save(ms, System.Drawing.Imaging.ImageFormat.Png); // ImageFormat.Bmp does not work with SDK 100.2! PictureMarkerSymbol pms = new PictureMarkerSymbol(RuntimeImage.FromStreamAsync(ms).Result); TestLayer.Graphics.Add(new Graphic(new MapPoint(2.3, 48.9, SpatialReferences.Wgs84), pms)); In the same way, if the creation of the bitmap was carried out using a BmpBitmapEncoder, it must be replaced by a PngBitmapEncoder (for example). This looks like a bug, no? Or the BMP is no longer supported and in this case it would be wise to remove it from uses related to bitmaps ... Regards, damien.
... View more
01-11-2018
04:24 AM
|
0
|
1
|
711
|
POST
|
Hello Morten, Perfect ! Your answer totally corresponds to my problem. Thank you very much ! In addition, I find it elegant to be able to permanently define the "useful" area and not have to pass the thikness parameter when repositioning the card (possibility offered by MapView1.SetViewAsync with SDK 10.2.x). Nice day to you and thank you again! Regards, damien.
... View more
01-10-2018
11:29 PM
|
1
|
0
|
1407
|
POST
|
Hello Preeti, Thank you for your answer but this one does not correspond to my problem. On the other hand, that of Morten (using MapView.ViewInsets) answers it completely. Thank you and have a nice day. Regards, damien.
... View more
01-10-2018
11:20 PM
|
0
|
0
|
1407
|
POST
|
Hi Preeti, I am currently testing v100.2 and I find that the possibility of specifying a "margin" (thickness) has still not been reintroduced. Or a subtlety escaped me, which is not impossible. Thank you in advance for your response. Regards, damien.
... View more
01-09-2018
04:41 AM
|
0
|
4
|
1407
|
POST
|
Hi, I was experiencing the same kind of crash for about 22 months on a project. Recently, we have been using support from ESRI France. After investigating for a whole day, we found that the crashes disappeared by passing the RenderingMode from the GraphicsLayer/GraphicsOverlay to "Static" (instead of "Dynamic", by default) But this has a not insignificant impact because: the HorizontalTextAlignment of the TextSymbol is now forced to Center the values of XOffset/ Offset have to be reviewed because the reference is no longer the same idem if you use the rotation of the markers by changing the Angle I hope this information can help ... Regards, damien.
... View more
06-22-2017
04:56 AM
|
0
|
0
|
177
|
POST
|
Hi, In an answer of an other question, Preeti Maske (from ESRI team) wrote this : Support to add margin is going to be available in the next update release. [...] Most likely around summer , like May-June time frame. Regards, damien.
... View more
06-12-2017
06:18 AM
|
0
|
0
|
669
|
POST
|
Hi Preeti, Cool ! Thank you for your answer. Is there a planned date for this next update? Regards, damien.
... View more
03-14-2017
12:15 AM
|
0
|
2
|
1407
|
POST
|
Hi, It seems to me that for the horizontal limitation (with 10.2.x Runtime) it is necessary to disable the "WrapAround" property of the MapView... Regards, damien. PS: I also am looking for the equivalent of MaximumExtent with version 100.x of SDK .NET.
... View more
03-13-2017
07:29 AM
|
0
|
0
|
1721
|
POST
|
Hi, With ArcGIS Runtime version 10.2.x, it was possible to optionally specify a "margin" (thickness) on the MapView.SetViewAsync() operations. Very convenient for the map to be correctly centered when, for example, a horizontal menu bar covers the bottom of the map (but may disappear in some cases). Example: await MapView1.SetViewAsync(mpYouAreHere, dblScale, tsDelay, new Thickness(0, 0, 0, Menu.ActualHeight)); I try to migrate my application to the new Runtime version 100 but I do not find this possibility. There is indeed a "padding" argument in the MapView.SetViewpointGeometryAsync() method but it is of type "double" but not "thickness" ; It is therefore not possible to specify a different "margin" for the 4 sides. Do you have an idea to help me? Thank you in advance. damien.
... View more
03-13-2017
05:01 AM
|
0
|
9
|
1905
|
Title | Kudos | Posted |
---|---|---|
1 | 01-10-2018 11:29 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|