POST
|
When a map service is published with field aliases, an identify against that service also brings back the alias as the attribute key. If the alias includes spaces it cannot be used in a Binding. (or can it?) So my problem is how to configure the identify task to bring back the actual field names rather than the field aliases? Thanks
... View more
05-09-2013
01:55 PM
|
0
|
2
|
2636
|
POST
|
I have an infowindow defined with a datatemplate. I want to perform an identify task and display the result in the infowindow. My code works to popup the infowindow but it comes up empty. How do I make the assignment to get the data into the infowindow? Also, in the definition of the identify task, is there a way to specify the single layer we want the results to come from? Thanks Here is my current code. private void IdentifyTask_ExecuteCompleted(object sender, IdentifyEventArgs args)
{
if (args.IdentifyResults != null && args.IdentifyResults.Count > 0)
{
// MessageBox.Show(args.IdentifyResults.Count.ToString());
MyInfoWindow.Anchor = clickPoint;
MyInfoWindow.IsOpen = true;
MyInfoWindow.Content = args.IdentifyResults;
}
else
{
MyInfoWindow.IsOpen = false;
}
}
... View more
05-09-2013
12:07 PM
|
0
|
1
|
705
|
POST
|
I have a map layer consisting of polygon areas. Is there some sample code available to show how I can label these polygons with one of the attribute fields such as the area name or number? They are displayed with a Feature Layer. Thanks
... View more
05-09-2013
07:22 AM
|
0
|
1
|
637
|
POST
|
Can someone suggest why my map (see below) will only draw the TAZ layer and will not draw the other 2 (at any scale)? The other 2 do have scale ranges set but required zoom is not high. It works fine when viewed in ArcGIS online. If I remove the scale ranges, they still do not draw. Is there something wrong with the service or server? Thanks. <Grid Name="MapGrid" Grid.Column="1" Margin="5,5,15,5">
<Rectangle Fill="LightGray"
RadiusX="10"
RadiusY="10"
Margin="0,10,10,0"
Height="Auto"
Stroke="SaddleBrown"
StrokeThickness="4"/>
<esri:Map x:Name="MyMap" Extent="748437,575771,1204687,267438" Margin="10,20,20,20" IsLogoVisible="False" >
<esri:Map.Layers>
<!--<esri:ArcGISDynamicMapServiceLayer ID="PAGBaseMap"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/PAGBaseMap/MapServer" VisibleLayers="1,2,3" />-->
<esri:FeatureLayer ID="ParcelLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/TAZ/MapServer/1"
Visible="True"
OutFields="*" />
<esri:FeatureLayer ID="CensusBlockLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/TAZ/MapServer/0"
Visible="True"
OutFields="*" />
<esri:FeatureLayer ID="TAZLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/TAZ/MapServer/2"
Visible="True"
OutFields="*" />
</esri:Map.Layers>
</esri:Map>
</Grid>
... View more
05-08-2013
10:39 AM
|
0
|
0
|
439
|
POST
|
If I create a maptip like this <esri:FeatureLayer.MapTip >
<Border Style="{StaticResource MapTip_Border}" esri:FeatureLayer.MapTipHideDelay="00:00:02.5">
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [NAME]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [ADDRESS]}" Foreground="Black" />
<TextBlock Text="__________________________________________" Foreground="Black" />
<TextBlock Text="Pollutants that are monitored at this site" Foreground="Black" />
<TextBlock Text="{Binding [PM1]}" Foreground="Black" />
<TextBlock Text="{Binding [PM2]}" Foreground="Black" />
<TextBlock Text="{Binding [CO]}" Foreground="Black" />
<TextBlock Text="{Binding [O3]}" Foreground="Black" />
<TextBlock Text="{Binding [SO2]}" Foreground="Black" />
<TextBlock Text="{Binding [NOX]}" Foreground="Black" />
<HyperlinkButton x:Name="myHyperLink" NavigateUri="{Binding [WebLink]}" TargetName="_blank" Content="Click here for more info." Foreground="DarkSlateBlue"/>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip> and the textblock value is empty, the textblock automatically collapses and take up no space in the maptip. However, if I create an infowindow like this <DataTemplate x:Key="DataWindowTemplate">
<StackPanel Margin="2">
<TextBlock Text="{Binding [NAME]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [ADDRESS]}" Foreground="Black" />
<TextBlock Text="__________________________________________" Foreground="Black" />
<TextBlock Text="Pollutants that are monitored at this site" Foreground="Black" />
<TextBlock Text="{Binding [PM1]}" Foreground="Black" />
<TextBlock Text="{Binding [PM2]}" Foreground="Black" />
<TextBlock Text="{Binding [CO]}" Foreground="Black" />
<TextBlock Text="{Binding [O3]}" Foreground="Black" />
<TextBlock Text="{Binding [SO2]}" Foreground="Black" />
<TextBlock Text="{Binding [NOX]}" Foreground="Black" />
<HyperlinkButton x:Name="myHyperLink" NavigateUri="{Binding [WebLink]}" TargetName="_blank" Content="Click here for more info." Foreground="DarkSlateBlue"/>
<Image Source="/SLAirQualityBusinessApplication;component/Assets/Images/CloseX.png" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="16" Width="15"/>
</StackPanel>
</DataTemplate>
<esri:InfoWindow x:Name="MyInfoWindow"
Padding="2"
CornerRadius="5"
Background="WhiteSmoke"
Map="{Binding ElementName=MyMap}"
ContentTemplate="{StaticResource DataWindowTemplate}"
MouseLeftButtonUp="MyInfoWindow_MouseLeftButtonUp" />
an empty textblock still takes a row in the result. Is there a way to make the infowindow behave like the maptip so there are no empty rows in the result? On further study I find that the first time the infowindow opens it DOES collapse the empty textblocks. It continues this as long as the point selected remains the same. However, when choosing a diffrent point (with different data) it then reserves the empty row space for the empty textblock. It continues to do this even after returning to the original point and data. Thanks
... View more
05-06-2013
12:50 PM
|
0
|
0
|
365
|
POST
|
In the sample loacted at http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#CustomZoomBox, how is the key combination assignment made? What if I wanted a different combination of keystrokes such as ctrl+uparrow to zoom without the mouse? Also how would you undo? Thanks
... View more
05-06-2013
07:10 AM
|
0
|
0
|
489
|
POST
|
Yikes! I had the wildcard wrong. Now this works in SSMS where (RtaID LIKE 'RTA%' and convert(integer,SUBSTRING(RtaID,5,2)) < 36) and (DevelopmentStatus='Not Started' or DevelopmentStatus='On Hold') but how can I use it in the FeatureLayer Where clause? The less than symbol seems to be the problem.
... View more
04-23-2013
12:29 PM
|
0
|
0
|
210
|
POST
|
What are the limitations with the WHERE clause of a FeatureLayer? I need to embed some SQL into it but my attempt to use the LIKE operator seems to not work. See below: <esri:FeatureLayer ID="FutureLines"
DisableClientCaching="False"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/TipData/MapServer/1"
OutFields="*"
Where="RtaID Like 'RTA*' and (DevelopmentStatus='Not Started' or DevelopmentStatus='On Hold')"
Renderer="{StaticResource FutureLinesRenderer}"
> Ultimately I will also need to parse out an integer value from the 5th and 6th characters of the RtaID. The format is like this: 'RTA-34a'. I need to display the features where the first 3 characters are 'RTA' and the integer value of the 5th and 6th is less than 35. Can someone help me out here? Thanks
... View more
04-23-2013
11:52 AM
|
0
|
1
|
629
|
POST
|
I tried your map and I didn't notice any problem (see screenshot). [ATTACH=CONFIG]23715[/ATTACH] As you did share your static resource 'Maptip_Border', I created one myself (with a background in order to avoid interaction with underlying objects) and the hyperlink seems working well. Oh , sorry I missed the border style. I initially tried to send the entire page but the site rejected it because it was too large. Here is my style which also has a background. <Style x:Key="MapTip_Border" TargetType="Border">
<Setter Property = "CornerRadius" Value="10" />
<Setter Property="BorderBrush" Value="SaddleBrown"/>
<Setter Property="BorderThickness" Value="3" />
<Setter Property="Margin" Value="0,0,15,15" />
<Setter Property="Background" Value="LightGray" />
</Style> I find that if I snap the mouse into the maptip with a very fast motion I can sometimes (1 in 10) get into it before it closes, but usually not and certainly not for the public users who will be using the map. Could there be some other settings in the page that would cause this problem? I have attached the full page to this post. Thanks
... View more
04-23-2013
07:32 AM
|
0
|
0
|
611
|
POST
|
Thanks again Dom. Here is my map in total. Perhaps you can see what's up. The hyperlink is in the MonitoringSitesLayer. <esri:Map x:Name="MyMap" Extent="748437,575771,1204687,267438" Margin="10,20,20,20" IsLogoVisible="False" >
<esri:Map.Layers>
<esri:FeatureLayer ID="PimaCounty"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/8" />
<esri:ArcGISDynamicMapServiceLayer ID="PAGBaseMap"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/StreetsBaseMap/MapServer"
VisibleLayers="0,1" />
<esri:FeatureLayer ID="AjoSO2Layer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/4"
OutFields="NAME, DESC"
Visible="false">
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" >
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [Name]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [Desc]}" Foreground="Black" TextWrapping="Wrap" Width="400"/>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ID="AjoPM10Layer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/3"
OutFields="NAME, DESC"
Visible="false">
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" >
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [Name]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [Desc]}" Foreground="Black" TextWrapping="Wrap" Width="400"/>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ID="AirPlanningLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/7"
OutFields="NAME, DESC"
Visible="true" >
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" >
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [Name]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [Desc]}" Foreground="Black" TextWrapping="Wrap" Width="400"/>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ID="TucsonCOMaintLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/5"
OutFields="Name, Desc"
Visible="false">
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" >
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [Name]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [Desc]}" Foreground="Black" TextWrapping="Wrap" Width="400"/>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ID="RillitoPM10Layer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/6"
OutFields="Name, Desc"
Visible="false">
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" >
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [Name]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [Desc]}" Foreground="Black" TextWrapping="Wrap" Width="400"/>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ID="SchoolsLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/2"
OutFields="SCHNAME, ADDRESS"
Visible="false">
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" >
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [SCHNAME]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [ADDRESS]}" Foreground="Black" />
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ID="HospitalsLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/1"
OutFields="NAME, ADDRESS"
Visible="False" >
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" >
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [NAME]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [ADDRESS]}" Foreground="Black" />
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
<esri:FeatureLayer ID="MonitoringSitesLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/0"
OutFields="*"
Visible="true" MouseLeftButtonUp="MonitorsFeatureLayer_MouseLeftButtonUp">
<esri:FeatureLayer.MapTip >
<Border Style="{StaticResource MapTip_Border}" esri:FeatureLayer.MapTipHideDelay="00:00:01.5">
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [NAME]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [ADDRESS]}" Foreground="Black" />
<TextBlock Text="__________________________________________" Foreground="Black" />
<TextBlock Text="Pollutants that are monitored at this site" Foreground="Black" />
<StackPanel Orientation="Horizontal">
<!--<TextBlock Text="PM10 - " Foreground="Black" />-->
<TextBlock Text="{Binding [PM1]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<!--<TextBlock Text="PM2.5 - " Foreground="Black" />-->
<TextBlock Text="{Binding [PM2]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<!--<TextBlock Text="CO - " Foreground="Black" />-->
<TextBlock Text="{Binding [CO]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<!--<TextBlock Text="Ozone - " Foreground="Black" />-->
<TextBlock Text="{Binding [O3]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<!--<TextBlock Text="SO2 - " Foreground="Black" />-->
<TextBlock Text="{Binding [SO2]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<!--<TextBlock Text="NO2 - " Foreground="Black" />-->
<TextBlock Text="{Binding [NOX]}" Foreground="Black" />
</StackPanel>
<HyperlinkButton x:Name="myHyperLink" NavigateUri="{Binding [WebLink]}" TargetName="_blank" Content="Click here for more info." Foreground="DarkSlateBlue"/>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer>
</esri:Map.Layers>
</esri:Map>
... View more
04-22-2013
10:37 AM
|
0
|
0
|
611
|
POST
|
Is it possible to make the presentation of maptip values conditional? For example a portion of my maptip contains this code. <StackPanel Orientation="Horizontal">
<TextBlock Text="NO2 - " Foreground="Black" />
<TextBlock Text="{Binding [NOX]}" Foreground="Black" />
</StackPanel> The value of NOX will be text either "Yes" or "No". I want the contents of this stackpanel to be visible only if the NOX value is "Yes". If the value is "No", I want the entire stackpanel to be hidden. Does anyone know of a way to accomplish this? Thanks
... View more
04-19-2013
09:35 AM
|
0
|
1
|
461
|
POST
|
I am trying to use the sample located here http://resources.arcgis.com/en/help/silverlight-api/samples/start.htm#OrderByFieldQuery. But my code Query myFinalQuery = new ESRI.ArcGIS.Client.Tasks.Query()
{
ReturnGeometry = true,
Where = "1=1",
OrderByFields = new List<OrderByField>() { new OrderByField("PLACENAM_3", SortOrder.Ascending) }
}; produces an error that says "ESRI.Client.Tasks.Query does not have a definition for OrderByFields" Thoughts to fix? perhaps I need a newer or different reference?
... View more
04-18-2013
02:49 PM
|
0
|
2
|
2947
|
POST
|
Thank you Dom. The sample you reference uses a GraphicsLayer. My map uses a FeatureLayer. I have tried this: <esri:FeatureLayer ID="MonitoringSitesLayer"
Url="http://gismaps.pagnet.org/ArcGIS/rest/services/AirQuality/MapServer/0"
OutFields="*"
Visible="true">
<esri:FeatureLayer.MapTip>
<Border Style="{StaticResource MapTip_Border}" esri:FeatureLayer.MapTipHideDelay="00:00:021.5">
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [NAME]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [ADDRESS]}" Foreground="Black" />
<StackPanel Orientation="Horizontal">
<TextBlock Text="PM10 - " Foreground="Black" />
<TextBlock Text="{Binding [PM10]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="PM2.5 - " Foreground="Black" />
<TextBlock Text="{Binding [PM2_5]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="CO - " Foreground="Black" />
<TextBlock Text="{Binding [CO]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Ozone - " Foreground="Black" />
<TextBlock Text="{Binding [O3]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="SO2 - " Foreground="Black" />
<TextBlock Text="{Binding [SO2]}" Foreground="Black" />
</StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock Text="NO2 - " Foreground="Black" />
<TextBlock Text="{Binding [NOX]}" Foreground="Black" />
</StackPanel>
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip>
</esri:FeatureLayer> but it doesn't seem to work. I find nothing in the code behind that look pertinent. Did I miss something? The maptip remains until I try to move into it and then closes immediately.
... View more
04-18-2013
08:02 AM
|
0
|
0
|
611
|
POST
|
Hi - I would like to place a hyperlink in a maptip. I believe the coding for this would be fairly straight forward but maptips close before you can get the mouse into it. So is this possible or not and what would the code look like? <esri:FeatureLayer.MapTip>
<Border CornerRadius="10" BorderBrush="SaddleBrown" BorderThickness="3" Margin="0,0,15,15" Background="LightGray">
<StackPanel Margin="7" Orientation="Vertical">
<TextBlock Text="{Binding [SCHNAME]}" Foreground="Black" FontWeight="Bold"/>
<TextBlock Text="{Binding [ADDRESS]}" Foreground="Black" />
</StackPanel>
</Border>
</esri:FeatureLayer.MapTip> Thanks
... View more
04-16-2013
10:52 AM
|
0
|
7
|
880
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|