|
POST
|
I used one of ESRI's template, and loaded multiple user control components. One component was from ESRI's sample: DriveTime, http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#DriveTimes Then, in the Main.xaml file, I use the following code to create the instance: <unb:DriveTime x:Name="MyDriveTime" Visibility="Collapsed" Height="110" Width="250" Canvas.Left="18" Canvas.Top="310" /> which is the same format as that used to crate multiple other user controls. I also checked the class: DriveTime and found nothing wrong. However, when I built it, I got the error message: 'Cannot create an instance of DriveTime'. What's the possible reason for this bug? If you know, please share. Thanks.
... View more
10-20-2010
06:12 AM
|
0
|
4
|
1333
|
|
POST
|
ali5110: I found the xap file in ClindBin folder. However it is in binary format. What Can I do for it? I also checked the path. I also have many other image files and all of them are in the same folder as specified as 'UserControls/Images/xxx.png' In my xaml file, I add the image as icon on the dialog box: <Image Source="/UnBlendedCS1_Oct1;component/UserControls/Images/i_pushpin.png" ... and it works. However there is no display for the one to be added on the map: <Grid.Resources> <esri:PictureMarkerSymbol x:Key="DefaultMarkerSymbol" OffsetX="0" OffsetY="31" Source="/UnBlendedCS_Oct; component/UserControls/Images/i_pushpin.png" /> </Grid.Resources> Both are idential in the path. But one is for Image control and another is for PictureMarkerSymbol. In ESRI's ource code in http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddressToLocation it is defined as <Grid.Resources> <esri:PictureMarkerSymbol x:Key="DefaultMarkerSymbol" OffsetX="0" OffsetY="31" Source="/Assets/images/flag-yellow-32x32.png" /> </Grid.Resources> Could you take a look again? Thanks.
... View more
10-20-2010
05:13 AM
|
0
|
0
|
771
|
|
POST
|
In an application, everything works fine except for the PictureMarkerSymbol defined, which does not display on the map. My code is below: <Grid Name="LayoutRoot" Background="Transparent"> <Grid.Resources> <esri:PictureMarkerSymbol x:Key="DefaultMarkerSymbol" OffsetX="0" OffsetY="31" Source="/UserControls/Images/i_pushpin.png" /> </Grid.Resources> I tried either Source="/UserControls/Images/i_pushpin.png" or Source="UserControls/Images/i_pushpin.png" but none of them works. The folder /UserControls/ is under the project. Is anything incorrect in the path?
... View more
10-18-2010
11:41 AM
|
0
|
4
|
1190
|
|
POST
|
Jenniffer: Thanks for your reply. Per your advice, I wrote the piece of code like that: fs.Features[0].Geometry.SpatialReference = _Map.SpatialReference; _Map.ZoomTo(fs.Features[0].Geometry); Then it works very well. Thanks.
... View more
10-18-2010
07:21 AM
|
0
|
0
|
588
|
|
POST
|
In Flex, I used the following piece of code to zoom-in a selected feature: map.centerAt(pt); extent = new Extent(pt.x - x_offset, pt.y - y_offset, pt.x + x_offset, pt.y + y_offset); map.extent = extent.expand(1.1); where the expand method is used. In SL, my code is below: envelope = getEnvelope(fs); // that returns the envelope w/ XMin, YMIN, XMAX and YMAX Map.Extent = envelope.Extent; However, I could not find its expand method in the API. If you know how to do, please help. Thanks.
... View more
10-18-2010
06:13 AM
|
0
|
3
|
922
|
|
POST
|
I loaded ESRI' source code for Drive Times from http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#DriveTimes. However, I got 1 error at _geoprocessorTask.ExecuteCompleted += GeoprocessorTask_ExecuteCompleted; Error 1 The call is ambiguous between the following methods or properties: 'UnBlendedCS1_Oct1.DriveTime.GeoprocessorTask_ExecuteCompleted(object, ESRI.ArcGIS.Client.Tasks.GPExecuteCompleteEventArgs)' and 'UnBlendedCS1_Oct1.DriveTime.GeoprocessorTask_ExecuteCompleted(object, ESRI.ArcGIS.Client.Tasks.GPExecuteCompleteEventArgs)' Thanks for your review and provide your hint for the solution.
... View more
10-13-2010
11:39 AM
|
0
|
1
|
804
|
|
POST
|
I loaded the sample code from ESRI's http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ClosestFacility I run debugging. After I click the 'Add Facilities', it executes Editor_EditCompleted private void Editor_EditCompleted(object sender, Editor.EditEventArgs e) { Editor editor = sender as Editor; if (e.Action == Editor.EditAction.Add) { if (editor.LayerIDs.ElementAt(0) == "MyFacilitiesGraphicsLayer") { e.Edits.ElementAt(0).Graphic.Attributes.Add("FacilityNumber", (e.Edits.ElementAt(0).Layer as GraphicsLayer).Graphics.Count); } else if (editor.LayerIDs.ElementAt(0) == "MyIncidentsGraphicsLayer") { e.Edits.ElementAt(0).Graphic.Attributes.Add("IncidentNumber", (e.Edits.ElementAt(0).Layer as GraphicsLayer).Graphics.Count); } if (facilitiesGraphicsLayer.Graphics.Count > 0 && IncidentsGraphicsLayer.Graphics.Count > 0) SolveButton.IsEnabled = true; } } However, I always get the Cancel value for the e.Action. Anyone knows that is wrong and how to fix it? Thanks.
... View more
10-13-2010
10:13 AM
|
0
|
1
|
1127
|
|
POST
|
In ESRI's provided source code, http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#OverviewMap, the overview map's extent does not bind with the mainpage map, but use the initially set extent. How can it be dynamically bind with the mainpage map? In the thread: http://forums.arcgis.com/threads/10033-Overview-map-does-not-show-contents-until-after-view-extent-changed?highlight=overviewmap ESRI's Jenniffer commented that she would look at it? Has this problem be solved? Thanks.
... View more
10-07-2010
04:54 AM
|
0
|
2
|
1151
|
|
POST
|
Scenario Desription: 1) Created MagifyingGlass.xaml and loaded ESRI's sample code in http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MagnifyingGlass 2) Created a button on the toolbar for the MagnifyingGlass tool if (btn == btnMagnifyingGlass) { // if it is collapsed _Parent.ShowMagnifyingGlass(); } and public void ShowMagnifyingGlass() { MyMagnifyingGlass.Visibility = Visibility.Visible; } Questions: 1) How to check whether the tool is collapsed or not (can't do like that: MyMagnifyingGlass.Visibility.Collapsed )? 2) How to set the tool Collapsed or Visible? Thanks.
... View more
10-07-2010
04:45 AM
|
0
|
2
|
797
|
|
POST
|
Jenniffer: It works per your feedback. Thanks a lot. Shaning
... View more
10-07-2010
03:39 AM
|
0
|
0
|
661
|
|
POST
|
I loaded ESRI's MagnifyingGlass component. However, the Magnifying Glass tool 1) Does not bind the street map but display an image map (see the image attached) 2) There is no magnifying function at all The codes are listed below: <esri:MagnifyingGlass x:Name="MyMagnifyingGlass" Visibility="Visible" HorizontalAlignment="Left" VerticalAlignment="Top" Map="{Binding ElementName=_Map}" > <esri:MagnifyingGlass.Layer> <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/NPS_Physical_World_2D/MapServer"/> </esri:MagnifyingGlass.Layer> </esri:MagnifyingGlass> where the _Map is defined in its .cs file: private MainPage _Parent; private Map _Map; public void SetMap(Map TheMap) { _Map = TheMap; } public void SetParent(MainPage TheParent) { _Parent = TheParent; } Please help if you know why. Thanks.
... View more
10-06-2010
07:50 AM
|
0
|
2
|
1113
|
|
POST
|
The problem has been solved by referring http://forums.arcgis.com/threads/14476-Magnifying-Glass-Map-Binding.
... View more
10-06-2010
07:19 AM
|
0
|
0
|
648
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-18-2023 10:02 AM | |
| 3 | 07-14-2023 12:29 PM | |
| 1 | 04-02-2021 12:16 PM | |
| 1 | 07-24-2017 11:31 AM | |
| 1 | 04-04-2016 03:59 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-01-2025
11:58 AM
|