|
POST
|
What I did is as the following, it mighe not a good way, but it really solved my problems. #1. Create a grid or panel to hold the data: <ScrollViewer x:Name="ImageScrollviewer" Visibility="Collapsed" Width="2" Height="2" HorizontalScrollBarVisibility="Auto" HorizontalAlignment="Left" VerticalAlignment="Bottom" VerticalScrollBarVisibility="Auto"> <Image x:Name="TestPdf" /> or <Stackpanel /> or <Grid /> you have to customize here according to the print page you like </ScrollViewer> Since this scrollviewer's size is small, they are under some other controls, just set visibility to visble when you decide to convert to pdf or image. It will not affect your interfacce. #2. convert "TestPdf" : WriteableBitmap bitmap = new WriteableBitmap(TestPdf, new TranslateTransform()) ...... #3. Use SilverPDF : PdfDocument pdfDoc = new PdfDocument(); ExportToPdf.AddPdfMapPage(bitmap, pdfDoc); you can add as many pages on the same pdf doc. Hope it helps.
... View more
12-19-2011
03:57 AM
|
0
|
0
|
1326
|
|
POST
|
What I did is : downloaded silverPDF.dll, it worked for me. Hello all, I would like to hear any suggestions how to export the silverlight ArcGIS datagrid to Adobe PDF file. Thanks for your inputs.
... View more
12-16-2011
03:46 AM
|
0
|
0
|
1326
|
|
POST
|
Hi, Dominique Thank you so much , I tested again, I realized I made a very silly mistaken for a complicated situation. My mistake like the following : #1. in Main Page, UserCotrol_load funtion, I have something like this : Control1 ctrl1 = new Control1(TestMap, testGLayer); Control1Panel.Children.Add(ctrl1); Control2 ctrl2 = new Control2(TestMap, testGLayer); Control2Panel.Children.Add(ctrl2); in Control1 code : testGLayer.MouseLeftButtonDown -> dosomething() in Control2 code : testGLayer.MouseLeftButtonDown -> dosomethingelse() #2. When we start the application, whenever, click the GLayer, it will excute both :dosomething(),dosomethingelse(), not one of them. Thanks again for your time.
... View more
12-13-2011
05:23 AM
|
0
|
0
|
295
|
|
POST
|
Hi, I experienced a problem with multiple times MouseLeftButtonDown on the same graphicsLayer, now I figured out how to avoid this problem, but I hope I could get better idea how to handle the issue. My problem is like the following: #1. I have an application with two user controls called userControl1, usercontrol2, a graphicsLayer called gLayer #2. In the MainPage, int the UserControl_Loaded function like this : control1 = new userControl1( map, gLayer); control2 = new usercontrol2(map, gLayer); in the userControl1 code, have some processes like : gLayer.graphics.Clear() -> gLayer.Graphics.Add(graphic) -> gLayer.MouseLeftButtonDown +=new GraphicsLayer.MouseButtonEventHandler ( gLayer_MouseLeftButtonDown1), then do something in the usercontrol2 code have processes like : gLayer.graphics.Clear() -> gLayer.Graphics.Add(graphic) -> gLayer.MouseLeftButtonDown +=new GraphicsLayer.MouseButtonEventHandler ( gLayer_MouseLeftButtonDown2), then do something else. #3. When I stated the application, with user controls1, it would be OK, but with usercontrol2, when mouseLeftButtondown on gLayer, I got the error : Required parameter is null or empty. Parameter name : graphics #4. If in the UserControl_Loaded function of the MainPage, put control2 over control1, then the error would come with control1, control2 would be OK. #5, When I used 2 graphicslayers for control1 and control2 respectively, it would be OK. Since in my application, I have many controls need to call the same graphicslayer and click on the same layer, I hope I could find a better way. Thanks in advance for your help.
... View more
12-12-2011
12:13 PM
|
0
|
2
|
644
|
|
POST
|
Please see if the following code could help you a little or not #region Map - mouse events private void HuntMap_MouseMove(object sender, MouseEventArgs e) { try { if (HuntMap.Extent != null) { System.Windows.Point screentPoint = e.GetPosition(HuntMap); ESRI.ArcGIS.Client.Geometry.MapPoint mapPoint = HuntMap.ScreenToMap(screentPoint); if (HuntMap.WrapAroundIsActive && mapPoint != null) { mapPoint = ESRI.ArcGIS.Client.Geometry.Geometry.NormalizeCentralMeridian(mapPoint) as ESRI.ArcGIS.Client.Geometry.MapPoint; CoordText.Text = string.Format("Web Mecator( X:Y ) : {0} : {1}", Math.Round(mapPoint.X, 0), Math.Round(mapPoint.Y, 0)); // convert to latitude and longtitude Graphic graphic = new Graphic(); graphic.Geometry = mapPoint; List<Graphic> gList = new List<Graphic>(); graphic.Geometry.SpatialReference = HuntMap.SpatialReference; gList.Add(graphic); GeometryService projService = new GeometryService(); projService.Url = ConfigManager.GeometryServiceUrl; projService.ProjectCompleted += new EventHandler<GraphicsEventArgs>(ConvertTolatLong_ProjectCompleted); projService.ProjectAsync(gList, new SpatialReference(4326)); } //end if (HuntMap.WrapAroundIsActive && mapPoint != null) } // end if } // end try catch (Exception error) { MessageBox.Show("HuntMap_MouseMove" + error.Message); } } //-------------------------------------------------- void ConvertTolatLong_ProjectCompleted(object sender, GraphicsEventArgs args) { try { MapPoint pt = args.Results[0].Geometry as MapPoint; LatLongText.Text = "Latitude: Longtitude ( X:Y): " + string.Format("{0} : {1}", Math.Round(pt.X, 4), Math.Round(pt.Y, 4)); } catch (Exception error) { } } //--------------------------------------------------- Hi all, sorry for my bad English, I'll try to explain:) are the coordinates of the mouse(x,y), in meters, I want to display on the map, in meters and WGS (min,sec & degress) tell me conversion algorithm private void MyMap_MouseClick(object sender, Map.MouseEventArgs args) { if (IdentifyGrid.IsSelected) { MapPoint clickPoint = args.MapPoint; MapCoordsTextBlock.Text = string.Format("X = {0}, Y = {1}", Math.Round(clickPoint.X, 4), Math.Round(clickPoint.Y, 4)); ......
... View more
12-12-2011
10:01 AM
|
0
|
0
|
313
|
|
POST
|
Hi, I just started to update my applications from version 2.2 to 2.3 this morning, I feel a little bit strange about cluster, symbol, renderer. I am not for sure it is a bug or ESRI redesigned the API in this new way. #1. I have graphics layers using cluster, I didn't use renderer, just in the code, set graphic.Symbol = Mymbol ( something like this). If I only have a few graphics, no cluster, I could not see anything about my graphicsLayer, if I have more graphics, I could see clusters, I zoomined and expanded the cluster, then the graphicslayer not show, no symbol displayed. Just like this ESRI sample (Graphics-> Simple Cluster http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SimpleClusterer ). When you expand the clusters, no individual Symbol displayed. #2. I made a little change, the graphics layers are still using cluster, still the same symbols, just put the simple in a renderer, set the graphic layers Renderer = MyRenderer, then it worked as before. Like the ESRI sample (graphics->Custom Clusterer: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomClusterer ). After I figured out this, it is not difficult for me to update my applications, just a little bit curious at this change.
... View more
12-05-2011
06:37 AM
|
0
|
10
|
1687
|
|
POST
|
If is for EGMP, ESDP , EWDP, I will be very interested, but they are not available yet. I am a MCSD and have been working on this field about 10 years.
... View more
10-04-2011
07:39 AM
|
0
|
0
|
309
|
|
POST
|
I wonder if you can wrap the plogon to pointcollection, the get the point count.
... View more
09-02-2011
09:41 AM
|
0
|
0
|
627
|
|
POST
|
one week ago, I tried to use nowcoast WMS layers, it didn't work as we expected, it was to slow. Here is some real-time hurricane layer links, you may want to take a look, I like it better. http://www.arcgis.com/home/item.html?id=4a9b65e79ea045ffbd1b6087674ee78b //------------------------------------- Web Cameras Active Hurricanes: http://esrilabs1.esri.com/ArcGIS/rest/services/LiveFeeds/Hurricane_Active/MapServer Stream Gauges: http://esrilabs1.esri.com/ArcGIS/rest/services/LiveFeeds/StreamGauge/MapServer NOAA Storm Reports: http://esrilabs1.esri.com/ArcGIS/rest/services/LiveFeeds/NOAA_storm_reports/MapServer NOAA Wind Speed / Direction: http://esrilabs1.esri.com/ArcGIS/rest/services/LiveFeeds/NOAA_METAR_current_wind_speed_direction/MapServer USGS Stream Gauges and Weather Stations: http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_usdata/MapServer Hurricane Wind Force Probability: http://esrilabs1.esri.com/ArcGIS/rest/services/LiveFeeds/NOAA_Current/MapServer US Precipitation Radar: http://atlas.resources.ca.gov/ArcGIS/rest/services/Atmosphere_Climate/RIDGE_Precip_Radar/MapServer US Weather Watches & Warnings: http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_weat/MapServer Surface Wind Velocity (NOAA): http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/analyses NOAA GOES Visible Image: http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs National Data Buoy Center: http://www.arcgis.com/sharing/content/items/cbbaec1f03cb4d788ef6319c391a1615/data Topographic: http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer
... View more
08-31-2011
01:05 PM
|
0
|
0
|
1333
|
|
POST
|
Hi, From samples such as : export pdf or print map, I have some ideas to export map as PDF with cross domain layers but not BING layers. Can somebody give me suggestion or help. Thanks in advance.
... View more
08-30-2011
10:25 AM
|
0
|
0
|
564
|
|
POST
|
The library seems not work for my situation: My map including my local dynamiclly map services, bing layers, and other real time weather layers from ESRI and NOAA. ( Cross domain ) Any suggestion will be apprecciated.
... View more
08-29-2011
08:24 AM
|
0
|
0
|
1461
|
|
POST
|
I need to draw a collection of ellipse with different width, height , but the same start point and angles on the map, then use the difference between 2 ellipses to do spatial query. Any help willbe appreciated.
... View more
08-15-2011
01:12 PM
|
0
|
1
|
3296
|
|
POST
|
Did you add the following code in generic.xaml under Theme folder ? <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/yourapp;component/UserControls/DraggableWindow.xaml" /> <ResourceDictionary Source="/yourapp;component/UserControls/WindowPanel.xaml" /> </ResourceDictionary.MergedDictionaries>
... View more
08-12-2011
04:49 AM
|
0
|
0
|
317
|
|
POST
|
I used the sample long time ago, I went inside the control source code, made a little change, it really worked for me.
... View more
07-15-2011
09:24 AM
|
0
|
0
|
396
|
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|