POST
|
If you have relative few records, you may want to retrieve them once and using LINQ to get the unique value on one field. If you have millions of records and want to get its unique value, it's better to do this job on server side rather than get all of them to the client side. On server side, you could using a GP services or a SOE operation to easily achieve your goal.
... View more
02-25-2012
05:17 AM
|
0
|
0
|
519
|
POST
|
Indeed, you can't control visibility of sublayers of a TiledMapServiceLayer from code in client side. Because when you add a TiledMapServiceLayer in client app(flex/silverlight/js), you actually retrieve several images in PNG/JPEG format from server on every panning/zooming of the map. The images you got from server have already been blended into a single 'layer' from multiple sublayers on server, such as layers of roads, cities, lakes are blended into a single image. So if you want to control the visibility of TiledMapServiceLayer(cached map service on server), you must set it before caching the map service. p.s.: If you using ADF or ArcMap as client of your cached map service, you can caching it into multi-layer map service, which generating multiple images of each sublayer, which client will get all of them, and blend them into one image on client side, so you can turn on/off the visibility of a sublayer. But flex/silverlight/js app does not support multi-layer cache, so does ArcGIS Server 10.1.
... View more
02-12-2012
03:16 PM
|
0
|
0
|
611
|
POST
|
Hi, nick_cam1980, the fact is that you do not need to call Refresh() method to update graphic's attribute or geometry. Just set/modify them first, the new value will be return when query again the graphic. The proper idea is to use data binding for your situation. Maintain a graphics collection as the graphicslayer's data source, so when the collection changing, no matter attributes or geometries, the graphicslayer will automatically reflect the changes, no need to call Refresh() method.
... View more
02-05-2012
09:22 PM
|
0
|
0
|
558
|
POST
|
Thanks diligentpig. 2nd and 3rd option which you have mentioned seems to be usefull in my case.Can you please share some code base if you have anything handy or provide some Suggestion on how to do that. Thanks Sorry, there is no ready to use code for this two methods now. But you can read following related links, hope this will be helpful. For method 2, please reference to online symbol gallery to look at how to custom a map symbol. http://help.arcgis.com/en/webapi/silverlight/samples/SymbolGalleryWeb/start.htm For method 3, here is a sample to demonstrate how to add UIElement to ElementLayer in xaml, you can also do this in code. And just consider your chart control as an UIElement. http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ElementLayer Here is a Chinese blog showing the final image of the two methods. http://blog.newnaw.com/?p=480
... View more
02-05-2012
03:22 PM
|
1
|
1
|
1074
|
POST
|
Generally speaking, you have three choice to achieve your target: 1. InfoWindow/MapTip. Put your any chart controls in InfoWindow/MapTip, it reasonable and good practice, but you need to click or put mouse over this graphic to show the chart. 2. Extend the MarkerSymbol class. This means set the chart as a symbol itself of a graphic. 3. Using the ElementLayer, treat each chart control as an UIElement and pin each one on a fixed map point.
... View more
02-02-2012
03:23 PM
|
0
|
0
|
1074
|
POST
|
As far as I know, the new version api (v2.4) is still built on Silverlight 4. So the best idea is create project for Silverlight 4 rather than 5.
... View more
02-01-2012
03:39 PM
|
0
|
0
|
417
|
POST
|
Map not showing in Silverlight application is mostly common but always easy to resolved problem. Just follow these steps to check where the issue is: 1. Ensure your map service is running by displaying it in Arcmap or Javascript API(from services directory); 2. Ensure you have the cross domain file in your web server and in the right place; 3. Ensure using the right class to add the map service. Note the difference between ArcGISDynamicMapServiceLayer and ArcGISTiledMapServiceLayer; 4. If now the problem remains, just using Fiddler or Firebug tools to check what happened during the map image loading course.
... View more
01-31-2012
04:12 PM
|
0
|
0
|
395
|
POST
|
While the new version of android sdk has been released, but the online api reference doc remain not updated. Please update soon. PS: No support for android emulator could be a very very big mistake. Please reconsider this issue.
... View more
12-15-2011
05:42 PM
|
0
|
2
|
819
|
POST
|
I've download a tile package file from http://www.arcgis.com/home/item.html?id=e6541657ec1e47ce9a20d512174df657 uploaded by Denise62. And ensure the file is valid by reading it using PBS(http://www.arcgis.com/home/item.html?id=48bf53da123e442ab8ac9aed52747552). But I can't load it as LocalTileCacheLayer in ArcGIS Runtime for WPF sdk. The Initialized event has been fired, but I found that the app has read the tile rows/columns as 256*256, but in fact, the .tpk file has cache in 128*128. So the correct tile can't be loaded. Don't know if this is a bug. update�?sorry for uncorrect infos, WPF Runtime SDK could correctly read the conf.xml/conf.cdi information as tiling scheme. But for the specific tile package file(http://www.arcgis.com/home/item.html?id=e6541657ec1e47ce9a20d512174df657), it really can't display correctly. When load it as a LocalTileCacheLayer, Map displays blank.
... View more
11-07-2011
09:52 PM
|
0
|
2
|
3179
|
POST
|
Thanks!!! I tried and it works! But I'm not sure whether it's because I have an ElementLayer with a relatively big Tiff image, my panning and zooming on the corresponding map flickers and not as smooth as your example. Anymore ideas on how to make it smoother? Thanks! You can remove the ElementLayer temporarily to test whether it's caused by it. Additionally, you can also subscribe to Map's ExtentChanged event, without modifying your code, this event is less cpu intensive. Have a try.
... View more
10-19-2011
04:59 PM
|
0
|
0
|
245
|
POST
|
What you need is to listen to the each Map's ExtentChanging event, and whenever one map zooms in/out, all others responding the same way. The key point is to avoiding endless loop by deciding the whether the new extent is the original one. Here is the sample and key code. http://newnaw.com/pub/sl/googlemapvsbingmap.html public MainPage()
{
InitializeComponent();
map1.ExtentChanging += new EventHandler<ESRI.ArcGIS.Client.ExtentEventArgs>(map_ExtentChanged);
map2.ExtentChanging += new EventHandler<ESRI.ArcGIS.Client.ExtentEventArgs>(map_ExtentChanged);
map3.ExtentChanging += new EventHandler<ESRI.ArcGIS.Client.ExtentEventArgs>(map_ExtentChanged);
map4.ExtentChanging += new EventHandler<ESRI.ArcGIS.Client.ExtentEventArgs>(map_ExtentChanged);
//map3.ViewChangeEnd+=new EventHandler<Microsoft.Maps.MapControl.MapEventArgs>(map_TargetViewChanged);
this.Loaded+=new RoutedEventHandler(MainPage_Loaded);
}
...
private void map_ExtentChanged(object sender, ESRI.ArcGIS.Client.ExtentEventArgs e)
{
if (e.OldExtent != null)
{
ESRI.ArcGIS.Client.Map map = sender as ESRI.ArcGIS.Client.Map;
switch (int.Parse(map.Name.Substring(3, 1)))
{
case 1:
if (!AreEqual(map2.Extent, e.NewExtent, 0.000000001))
{
map2.Extent = e.NewExtent;
map3.Extent = e.NewExtent;
map4.Extent = e.NewExtent;
}
break;
case 2:
if (!AreEqual(map1.Extent, e.NewExtent, 0.000000001))
{
map1.Extent = e.NewExtent;
map3.Extent = e.NewExtent;
map4.Extent = e.NewExtent;
}
break;
case 3:
if (!AreEqual(map4.Extent, e.NewExtent, 0.000000001))
{
map1.Extent = e.NewExtent;
map2.Extent = e.NewExtent;
map4.Extent = e.NewExtent;
}
break;
case 4:
if (!AreEqual(map3.Extent, e.NewExtent, 0.000000001))
{
map1.Extent = e.NewExtent;
map2.Extent = e.NewExtent;
map3.Extent = e.NewExtent;
}
break;
}
}
...
private static bool AreEqual(Envelope e1, Envelope e2, double tolerance)
{
return
Math.Abs(e1.XMin - e2.XMin) < tolerance &&
Math.Abs(e1.YMin - e2.YMin) < tolerance &&
Math.Abs(e1.XMax - e2.XMax) < tolerance &&
Math.Abs(e1.YMax - e2.YMax) < tolerance;
}
... View more
10-18-2011
05:45 PM
|
0
|
0
|
245
|
POST
|
In 2.2 final api, there is a new EditGeometry class to control fine grained editing of a geometry, and it has a method called StopEdit, you could use this class to finish your job. Example: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#EditToolsGeometry Hope this helps.
... View more
10-08-2011
05:55 PM
|
0
|
0
|
138
|
POST
|
Hi everybody, I just start build a custom REST SOE from Visual Studio template, and I learned the only way to get the ServerObject(MapServer) which SOE runs in is using IServerObjectHelper interface. I retrieved the MapServer using following code:
private IServerObjectHelper2 serverObjectHelper;
private IMapServer3 _mapServer;
...
#region IServerObjectExtension Members
public void Init(IServerObjectHelper pSOH)
{
serverObjectHelper = (IServerObjectHelper2)pSOH;
_mapServer = (IMapServer3)serverObjectHelper.ServerObject;
}
and everything goes ok. However, when I debugging the SOE, and add watch to the _mapServer variable, it's said that Cannot obtain fields or call methods on the instance of type 'SOE.SOEDynamicTileMapService' because it is a proxy to a remote object. [ATTACH]8796[/ATTACH] In my opinion, the SOE is in the very same process as the ServerObject(MapServer), if so, why the ServerObject retrieved from IServerObjectHelper is remote object?
... View more
09-06-2011
11:50 PM
|
0
|
0
|
1863
|
POST
|
As you know, the SOE extension machine is not terribly flexible. One alternative you have is to provide a proxy. You can send your request to the proxy in any form that it understands and have it forward the request, rewriting it as needed, to your SOE. A great example of this is what we do in 9.3.1. In 9.3.1 you cannot extend the SOE using REST but we do. How do we do it? What we do is to send the REST request to the proxy which performs a SOAP call and then returns the results. This gives us the same REST interface in 9.3.1 and 10.0. Hi rlwatson, thanks for your reply. I've been aware it's possible to use a proxy in web server to redirect request to one soe operation in my situation. However, the additional proxy breaks the convenient structure of soe... I wish the uri template of a soe operation can be customized to suite our needs.
... View more
09-06-2011
06:30 PM
|
0
|
0
|
336
|
Title | Kudos | Posted |
---|---|---|
1 | 02-05-2012 03:22 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|