POST
|
I don't see in your code where you put the map in the visual tree. That might explain why the map doesnt' show up:) Where should I placed the Map ? What I should do to appear the map?
... View more
05-24-2013
10:55 PM
|
0
|
0
|
224
|
POST
|
I wanna a map bindable control to use in MVVM pattern but I have a problem. I created a class like this.
public class MapControl : Control
{
public static readonly DependencyProperty MapProperty =
DependencyProperty.RegisterAttached(
"Map",
typeof(Map),
typeof(MapControl),
new PropertyMetadata(OnMapChanged));
[Bindable(true)]
public Map Map
{
get { return (Map)GetValue(MapProperty); }
set { SetValue(MapProperty, value); }
}
private static void OnMapChanged(DependencyObject depObject, DependencyPropertyChangedEventArgs e)
{
}
}
And in my ViewModel I created a new Map like this.
public class MainPageViewModel:INotifyPropertyChanged
{
private Map map;
public MainPageViewModel()
{
Map startMap = new Map();
startMap.Layers.Add(new ArcGISTiledMapServiceLayer { Url = "http://....." });
Map = startMap;
}
public Map Map
{
get
{
return map;
}
set
{
map = value;
OnPropertyChanged("Map");
}
}
when I put breakpoints Map object in ViewModel or in Custom MapControl, Everything is working fine.
<Grid x:Name="LayoutRoot" Background="White" DataContext="{Binding Source={StaticResource ViewModel}}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<esriCustom:MapControl Map="{Binding Map}" Grid.Column="0">
</esriCustom:MapControl>
</Grid>
I finally bind the ViewModel object Map to View MapControl. But nothing is appeared.
... View more
05-24-2013
04:56 AM
|
0
|
2
|
716
|
POST
|
ArcGISDynamicMapServiceLayer mapServiceLayer = MyMap.Layers[8] as ArcGISDynamicMapServiceLayer;
mapServiceLayer.VisibilityChanged += (s, e) => System.Windows.MessageBox.Show("ok");
and I have a checkbox that respoisble change the layer vsibility.
<CheckBox Content="ways"
IsChecked="{Binding MyMap.Layers[8].Visible, Mode=TwoWay}"/>
the chechbox working and changing the visibility of layer. But visibility changed event of ArcGISDynamicMapServiceLayer is not firing. I put a breakpoint and watched that Layer[8] of MyMap has visibilityChanged event and not null. [ATTACH=CONFIG]20125[/ATTACH]
... View more
12-20-2012
10:36 PM
|
0
|
1
|
1751
|
POST
|
I have 5 ArcgisDynamicLayer. Tey are including published mapservices. One of them is including water pipes and points, another is electrical and another is fiber and so on. I wanna click one of them and get the field data to list in a listbox. Which ways are make sense for this. I do not wanna use FeatureLayer and mouse clilck event, because I should add all layers to Map object. Is there onother way?
... View more
12-10-2012
02:53 AM
|
0
|
0
|
426
|
POST
|
I think, ESRI should convert to Control ArcgisDynamicServiceLayer and FeatureLayer objects to Command binding. Silverlight supports the composite application development with Prism. If we develop the applications in a single project (not composite), the xap files size is increasing. Is this true?
... View more
10-15-2012
03:21 AM
|
0
|
0
|
163
|
POST
|
Yes, Layer is not a control. You can probably bind to Map, ConverterParameter with ID of your layer and a Converter that would get the layer given ID instead. I am binding to Map object successful and I wanna do composite application. For example MouseEnter and MouseLeave event binding with command to Feature Layer. But this not works. Binding everything to Map object is not make sense.
... View more
10-15-2012
03:10 AM
|
0
|
0
|
163
|
POST
|
I wanna command bind to FeatureLayer, but not werking. I am using Prism library and Esri silverlght API. I read from prism document that Commands handle UI actions. Is the issue because FeatureLayer is not derived from Control? My code is folowing.
xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
xmlns:cmd="clr-namespace:Infrastructure.Commands;assembly=Infrastructure"
xmlns:fcmd="clr-namespace:Infrastructure.Commands.FeatureLayerCommands;assembly=Infrastructure"
<esri:Map x:Name="MyMap"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
cmd:MouseClick.Command="{Binding Map_Click}"
cmd:SizeChange.Command="{Binding Size_Change}">
<esri:FeatureLayer ID="ff"
Url="http://domain/arcgis/rest/services/serv/MapServer/4"
Mode="OnDemand"
fcmd:FeatureLayerMouseEnter.Command="{Binding FeatureLayer_MouseEnter}"
/>
</esri:Map>
Map commands as following are working cmd:MouseClick.Command="{Binding Map_Click}" cmd:SizeChange.Command="{Binding Size_Change}" But feature layer command is not working and no error occuring. fcmd:FeatureLayerMouseEnter.Command="{Binding FeatureLayer_MouseEnter}" Is the problem about FeatureLayer is not a UI Control
... View more
10-09-2012
04:26 AM
|
0
|
3
|
553
|
POST
|
Each client uses a connection. When you start a map service with one connection in four threads on three servers, it will create 12 connections (1x3x4). If you have an Enterprise ArcSDE install, you can increase the number of maximum connections, but you may be limited to 70-115 application server connections by Windows (search on "non-interactive desktop heap") - V You mean Each map service created 1 instance. But what means "four thread on three server"?
... View more
10-02-2012
11:03 PM
|
0
|
0
|
247
|
POST
|
When I start the server, the instance count of ArcSDE is increasing to 25-30. And some times later the instance count is increasing again and I cannot connect to ArcSDE from ArcMap. instance clients machines are: arcsde The error is: Failed to connect to database. Maximum number of connections to instance exceeded 1-what is the reason of the instance increment. 2-Tere are published services from "http://<domain>/arcGIS/Services" url. Is this published count effects?
... View more
10-02-2012
05:14 AM
|
0
|
3
|
2126
|
POST
|
Hi, I have a problem about indetify. I have a method that goes to server and gets JSON data about clicked on the Map. Parameters: [ATTACH=CONFIG]17914[/ATTACH]
private Uri buildIdentifyURL(double x, double y, double mapWidth, double mapHeight, int dpi, double minx, double miny, double maxx, double maxy)
{
StringBuilder sbURL = new StringBuilder();
sbURL.Append("http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer/identify?geometryType=esriGeometryPoint&f=json&layers=visible&returnGeometry=false");
sbURL.AppendFormat("&geometry={0},{1}", x.ToString(), y.ToString());
sbURL.AppendFormat("&mapExtent={0},{1},{2},{3}", minx.ToString(), miny.ToString(), maxx.ToString(), maxy.ToString());
sbURL.AppendFormat("&imageDisplay={0},{1},{2}", mapWidth.ToString(), mapHeight.ToString(), dpi);
sbURL.Append("&tolerance=10");
return new Uri(sbURL.ToString());
}
When I click the Map no result is coming from server. My service is working well. The California service has point, polygon, polyline datas on it. I am clicking the point or any line on map, but no result.
... View more
09-24-2012
05:33 AM
|
0
|
0
|
2027
|
POST
|
I wanna authorize the users for services. For example, a user from a city only see the rivers of that city. How can I create a mechanism for this scenario? In silverlight or service side?
... View more
09-05-2012
10:55 PM
|
0
|
1
|
506
|
POST
|
I have a control template in page Layout as following. <Grid x:Name="LayoutRoot">
<Grid.Resources>
<ControlTemplate x:Key="myTemplate" TargetType="esri:MapTip">
<Border CornerRadius="10" Background="#DDFFEEEE" BorderThickness="4" BorderBrush="#99FF0000">
<StackPanel Background="#DDFFFFFF">
<sdk:TabControl Height="180" Margin="5" Name="tabControl1" Width="300">
<sdk:TabItem Header="Info" Name="infoTab">
<TextBlock x:Name="cityInfoTxt" Tag="{Binding [City_ID]}"/>
</sdk:TabItem>
</sdk:TabControl>
</StackPanel>
</Border>
</ControlTemplate> In code behind how can I access the <TextBlock x:Name="cityInfoTxt" /> ?? I tried this,
private void button1_Click(object sender, RoutedEventArgs e)
{
var te = this.LayoutRoot.Resources["myTemplate"] as ControlTemplate;
} but can not access the textblock in the tab control.
... View more
06-26-2012
06:17 AM
|
0
|
1
|
1368
|
POST
|
In order to use the 'Updated' FeatureLayer you need to add a handler for the UpdateComplete Event and than have your code run inside that handler Something along these lines
layer.UpdateComplete += (s,e) => {
Map.Extent = layer.Geometry.Extent;
};
layer.Update();
I tried these codes to order, layer.UpdateCompleted += (snd, evt) => { new Envelope(399368, 4466618, 568578, 4568478); }; layer.UpdateCompleted += (snd, evt) => { Map.Extent = layer.Geometry.Extent; }; layer.UpdateCompleted += (snd, evt) => { Map.ZoomTo(mevt.layer.Geometry.Extent); }; layer.UpdateCompleted += (snd, evt) => { Map.ExtentChanged += (msnd, mevt) => { Map.ZoomTo(mevt.NewExtent);}; Map.Extent = layer.Geometry.Extent; }; but not worked
... View more
06-26-2012
12:10 AM
|
0
|
0
|
324
|
POST
|
In the following code I wanna zoom to selected city. But zoom is unsuccessful.
private void ctxQueryComBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
City selectedCity = ctxQueryComBox.SelectedItem as City;
FeatureLayer layer = Map.Layers["cityFeature"] as FeatureLayer;
if (layer == null || selectedCity ==null)
return;
layer.Where = string.Format("CityId = '{0}'", selectedCity.Id); // query
layer.Visible = true;
layer.Update();
Map.Extent = layer.Geometry.Extent;
cxDatagrid.GraphicsLayer = layer;
} when I selected the city from the combobox, zoom not working.
... View more
06-25-2012
11:16 PM
|
0
|
9
|
2846
|
POST
|
In the example you point out, all tiled layers are using the same spatial reference (102100). The steps I gave are only useful to replace a tiled layer by a tiled layer in another spatial reference. Ok, are the spatial references different, that I gave above? or same? [PHP]1. Arcgis 9.3.1 Spatial Reference: PROJCS["Transverse Mercator",GEOGCS["GCS_D_ITRF_1996",DATUM["D_ITRF_1996",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",30.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] 2. Arcgis 10 Spatial Reference: PROJCS["WGS_1984_UTM_Zone_35N",GEOGCS["GCS_WGS_1984",DATUM["D_ITRF_1996",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",30.0],PARAMETER["Scale_Factor",1.0],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]][/PHP] these looks like same.
... View more
06-13-2012
09:51 PM
|
0
|
0
|
330
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|