|
POST
|
Here's a Chinese blog talk about how to achieve this in several situations, FYI. http://blog.newnaw.com/?p=633
... View more
04-21-2011
04:37 PM
|
0
|
0
|
2259
|
|
POST
|
I am able to get each individual tile from a tile cache, with each request by intercepting the "TileLoading" event. That works fine. But, how do i then stitch them all back together for the map? I just found this documentation on doing what I am doing: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.ArcGISTiledMapServiceLayer~GetTileUrl.html but now don't know how to put everything back together so that i can load the map with my tiles. this is how i am getting the tiles. when i am watching fiddler, i see an initial connection to the map service, but then see no more communication. is assigning the e.ImageSource all i really need to do? private void ArcGISTiledMapServiceLayer_TileLoading(object sender, ESRI.ArcGIS.Client.TiledLayer.TileLoadEventArgs e) { string sBaseLocation = @"D:\Cache\Test\_alllayers"; ImageSourceConverter isc = new ImageSourceConverter(); e.ImageSource = (ImageSource) isc.ConvertFromString(sBaseLocation + "\\L" + e.Level.ToString().PadLeft(2, '0') + "\\R" + e.Row.ToString("x").PadLeft(8, '0') + "\\C" + e.Column.ToString("x").PadLeft(8, '0') + ".png"); } any help would be greatly appreciated. thanks david You can inherit from TiledLayer or TiledMapServiceLayer, and override its GetTileSource(protected override void GetTileSource(int level, int row, int col, Action<System.Windows.Media.ImageSource> onComplete) method, return your image in onComplete action, that's all.
... View more
03-24-2011
06:00 PM
|
0
|
0
|
449
|
|
POST
|
The ArcGIS API for JS/Flex/Silverlight/WPF always can read compact cache map service, so there must be something wrong with your service. Add it to ArcMap to determin if the map service works fine.
... View more
03-20-2011
06:13 PM
|
0
|
0
|
781
|
|
POST
|
Currently there is no way to get an RSS feed from arcgis.com. It is on the list of features to consider for a future release. Thanks Mike Thanks for your reply, Mike. Looking forward to your great work
... View more
01-08-2011
10:25 PM
|
0
|
0
|
430
|
|
POST
|
At this time, there is no out-of-the-box support for labelling a feature layer but you can create your own symbols (see custom symbols sample) and add a TextBlock in these symbols binded to any attribute of your graphic:
<TextBlock Text="{Binding Attributes[MyLabel]}" />
Or, just add another graphic with TextSymbol at the same location of your each feature. This is simple, but your graphic quantity would be double.
... View more
01-04-2011
03:01 PM
|
0
|
0
|
390
|
|
POST
|
Hi guys, when using older code gallery, each code gallery can be subscribed by RSS feeds. So I just wondered if there is the same way to subscribe recently upload applications? I just don't want miss any great applications in our community.
... View more
12-29-2010
03:29 PM
|
0
|
3
|
682
|
|
POST
|
Why not just simply use a symbol in ElementLayer? http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ElementLayer
... View more
12-08-2010
03:05 PM
|
0
|
0
|
631
|
|
POST
|
In case of you are going to write code to implement the edit logic: editing the geometry, using the Editor class editng the attachments, using the FeatureLayer class
... View more
11-20-2010
09:38 PM
|
0
|
0
|
341
|
|
POST
|
I see this approach is used on the states graphics layer on this sample page, but it is assigned to a polygon layer, underneath a point layer. If the delay parameter is defined on the map tip for a point graphics layer which overlays a polygon graphics layer, the delay is never activated. For example, assign the same MapTipHideDelay to the CitiesGraphicslayer: <esri:GraphicsLayer ID="CitiesGraphicsLayer" Initialized="CitiesGraphicsLayer_Initialized" >
<esri:GraphicsLayer.MapTip>
<Border esri:GraphicsLayer.MapTipHideDelay="00:00:1.5" BorderBrush="DarkGray" CornerRadius="13" BorderThickness="1" Margin="0,0,15,15" > The delay works fine for cities like Miami and Savannah, where the user can mouse directly to the east and not mouse over one of the states polygons, but anywhere else it behaves as if the delay was not configured. I understand this is happening because mousing off the cities triggers mouse on the states, but in my site I do have overlapping polygon/point graphics layers and I want to show a clickable map tip for the point layer. Again, a Flex/Javascript-style InfoWindow would be the ideal solution for this, but do you have any suggestions on how to deal with maptips on overlapping graphics layers? Thanks! There do has a way: Just like morten said, define a UserControl as your infowindow, but put it in an EnvelopeLayer, which will automatically process the children's position base on the map extent changing. BTW, the ElementLayer on top of a GraphicsLayer won't block the click event of the GraphicsLayer:)
... View more
10-18-2010
12:02 AM
|
0
|
0
|
423
|
|
POST
|
Hope some days silverlight could allow animation applys to DependencyObject, so a graphic would take advantage of a storyboard in animation.
... View more
10-14-2010
03:38 AM
|
0
|
0
|
348
|
|
POST
|
/// <summary>
/// create a new circle geometry, which is polygon, depending on the given center and radius
/// @diligentpig
/// @http://newnaw.com
/// </summary>
/// <param name="ptCenter">center of the newly created circle.</param>
/// <param name="dRadius">radius of the newly created circle, in screen pixel.</param>
/// <param name="n">precision, represents how many point does the return polygon have. These points are symmetrily located.
/// if n=0, then transfer to default precision which n=32</param>
/// <param name="map">the map control, used for converting mappoint to screenpoint and vice versa.</param>
/// <returns>a polygon geometry simulate a circle</returns>
public static Polygon createCirclePolygon(MapPoint ptCenter, double dRadius, int n,ESRI.ArcGIS.Client.Map map)
{
PointCollection pc = new PointCollection();
System.Windows.Point ptCenterScreen = map.MapToScreen(ptCenter);
n = n <= 0 ? 32 : n;
for (int i = 0; i < n; i++)
{
//ecah point on the circle, counterclockwise
double angle = (Math.PI * 2) / n * i;
System.Windows.Point p = new System.Windows.Point()
{
X = ptCenterScreen.X + dRadius * Math.Cos(angle),
Y = ptCenterScreen.Y + dRadius * Math.Sin(angle)
};
pc.Add(map.ScreenToMap(p));
};
//add the last, which is exact the first, point.
pc.Add(map.ScreenToMap(new System.Windows.Point()
{
X=ptCenterScreen.X+dRadius,
Y=ptCenterScreen.Y
}));
Polygon polyg = new Polygon()
{
SpatialReference=map.SpatialReference
};
polyg.Rings.Add(pc);
return polyg;
}
... View more
10-14-2010
01:32 AM
|
0
|
0
|
791
|
|
POST
|
Hi guys, is there a possibility for user to upload a picture file and save it as a feature's attribute in arcgis api for silverlight? Supposing there is a "photo" field which type is raster in my featureclass, how to save a picture file into this field of a newly created graphic and post it back to the server? btw, I'm using arcgis server 10. Thanks for any advice.
... View more
09-11-2010
03:27 AM
|
0
|
3
|
816
|
|
POST
|
Did you ever get this to work? I am trying to use a SerialPortGpsConnection with a GPS emulator. I know the SerialPortGpsConnection finds the gps connection and it writes successfully to the log file. And I assigned it to the GPSDisplay but it never updates the GPS location on the map. private SerialPortGpsConnection serialPortGpsConnection1 = new SerialPortGpsConnection();
private void openButton_Click(object sender, RoutedEventArgs e)
{
try
{
// Create an instance of MobileCache, and set StoragePath
MobileCache m_mobileCache = new MobileCache();
m_mobileCache.StoragePath = @"c:\temp\MapCache";
m_mobileCache.Open();
// Load layers from MobileCache to Map control
mapControl1.MapLayers.AddRange(m_mobileCache);
//Declare a generic GPS connection variable
GpsConnection GpsConn = null;
//Uncoment to Use SerialGPSConnection if you are reading GPS data from a device
serialPortGpsConnection1.PortName = "AUTO";
serialPortGpsConnection1.LoggingFile = @"c:\temp\logginggps.log";
serialPortGpsConnection1.Open();
Boolean port = serialPortGpsConnection1.IsOpen;
if (port) MessageBox.Show("open");
GpsConn = serialPortGpsConnection1;
gpsDisplayControl1.GpsConnection = GpsConn;
gpsDisplayControl1.Map = mapControl1;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
} Hi, buddha, I haven't used the serialPortGpsConnection1, try to enable serialPortGpsConnection first and set GpsConn = serialPortGpsConnection1; gpsDisplayControl1.GpsConnection = GpsConn; gpsDisplayControl1.Map = mapControl1; before you open it. About my problem, I finally figure it out by using the internal GPSDisplay and GPSConnection class within the ArcGIS Mobile App for Windows. the key code is: if (signinExtension.UserID == "工�?人�??A")
{
fgc = new FileGpsConnection();
fgc.Enabled = true;
fgc.FileName = @"c:\fangchengdongli.txt";
fgc.Cycling = true;
fgc.ReadInterval = 1000;
MobileApplication.Current.GpsConnectionManager.GpsDisplay.GpsConnection = fgc;
fgc.Open();
}
... View more
08-22-2010
11:32 PM
|
0
|
0
|
1295
|
|
POST
|
If I didn't got an iOS device, but wondering to experience the ArcGIS for iPhone application, is there any way to run it in a simulator? BTW, I have a MAC with iPhone sdk 4.01 installed.
... View more
08-21-2010
07:26 PM
|
0
|
6
|
3535
|
|
POST
|
ArcGIS API for silverlight/wpf 2.1 release will have an option for users to allow them manage local cache.
... View more
08-20-2010
10:47 PM
|
0
|
0
|
409
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-05-2012 03:22 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|