POST
|
My apologies for not responding to this. I used our main account when I posed this question. I have not tried an emulator. Device is a Samsung SM-P900 Lollipop 5.0.2 The FeatureLayer is a dissolved roadcenterlines fc of 3274 Features (Polylines of course) ArcGIS 10.3.1 with runtime enabled. Have not upgraded 10.5.1 yet, waiting on Server upgrades first.
... View more
05-23-2017
07:19 AM
|
0
|
0
|
222
|
POST
|
I have an offline Gdb that I use and I have noticed that random segments of my roadcenterlines will not display when I pan to them. However, when I pinch the device screen, those segments appear, but I pan away and come back and they are invisible again. I also noticed that labels for roads, again random, do not display. Nothing I do makes this change. My Spatial Reference is matching with the MapView and my FeatureLayer. I have attached an image, if you can see it, where there is a broken segment on the road running NW from the intersection. Once again, if I pinch the screen it will appear. If I pan away and back to it, it disappears.
... View more
03-09-2017
08:42 AM
|
0
|
2
|
881
|
POST
|
I am attempting to execute a simple query of a rest service containing a point feature class. When I build out the query I am receiving no errors. When I run the application in a browser I receive error 400: invalid or missing parameters. XAML Code: <UserControl x:Class="crime_map.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:esri="http://schemas.esri.com/arcgis/client/2009" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="600" d:DesignWidth="1200"> <Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <esri:SimpleMarkerSymbol x:Key="DefaultMarkerSymbol" Size="6" Color="Red" Style="Circle" /> </Grid.Resources> <esri:Map Background="White" WrapAround="True" x:Name="crimeMap"> <esri:ArcGISTiledMapServiceLayer Url="http://maps.berkeleywv.org/arcgis/rest/services/Constant/berkeley_relief_base_07172013/MapServer"/> <esri:GraphicsLayer ID="MyGraphicsLayer" /> </esri:Map> <TextBox x:Name="zipText" Text="25401" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0" Width="60"/> <Button x:Name="zipsearchBtn" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="75,10,0,0" Height="25" Content="Search" /> </Grid> </UserControl> VB: Imports System Imports System.Windows Imports System.Windows.Controls Imports ESRI.ArcGIS.Client Imports ESRI.ArcGIS.Client.Tasks Partial Public Class MainPage Inherits UserControl Public Sub New() InitializeComponent() Dim zipQuery As New QueryTask("http://maps.berkeleywv.org/arcgis/rest/services/law_enforcement/crime_2013/MapServer/0") AddHandler zipQuery.ExecuteCompleted, AddressOf QueryTask_ExecuteCompleted AddHandler zipQuery.Failed, AddressOf QueryTask_Failed Dim zipcodeQuery As New ESRI.ArcGIS.Client.Tasks.Query() zipcodeQuery.ReturnGeometry = True zipcodeQuery.OutFields.Add("zipcode") zipcodeQuery.Where = zipText.Text zipQuery.ExecuteAsync(zipcodeQuery) End Sub Private Sub QueryTask_ExecuteCompleted(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.QueryEventArgs) Dim featureSet As FeatureSet = args.FeatureSet Dim graphicsLayer As GraphicsLayer = TryCast(crimeMap.Layers("MyGraphicsLayer"), GraphicsLayer) If featureSet Is Nothing OrElse featureSet.Features.Count < 1 Then MessageBox.Show("No features found") Return End If For Each graphic As Graphic In featureSet.Features graphic.Symbol = TryCast(LayoutRoot.Resources("DefaultMarkerSymbol"), ESRI.ArcGIS.Client.Symbols.Symbol) graphicsLayer.Graphics.Add(graphic) Next End Sub Private Sub QueryTask_Failed(ByVal sender As Object, ByVal args As TaskFailedEventArgs) MessageBox.Show("Query failed: " & args.Error.ToString()) End Sub End Class My apologies if this is not posted properly. Thanks in advance for the help.
... View more
08-21-2013
07:00 AM
|
0
|
0
|
424
|
POST
|
OK, I understand how to apply the "WHERE", but I am not seeing how I am going to apply this to work with 2 separate layer lists. Layer List A = Units, Layer List B = Years User selects, via checkbox, UNIT A, UNIT B and UNIT C, then the user goes to LayerList B and selects Year 2010, the map populates with the appropriate selected data. Then the user decides they want to remove UNIT C, so they unselect it from Layer List A, and is now viewing data for the remaining units in the selected year. This is how it has been requested to set the map up, so the user can see all their choices in front of them without having to use a drop-down or type what they are looking for in a search box.
... View more
06-05-2013
05:26 AM
|
0
|
0
|
198
|
POST
|
I appreciate the response Dominique, unfortunately that will not resolve my dilemma. I have to use a layer list that will always be displayed for the user, allowing them to turn on/off whatever they need. If I created a layer for each units calls by year I would have a layerlist that was entirely too large for the user to look at.
... View more
05-24-2013
03:52 AM
|
0
|
0
|
198
|
POST
|
I have writers block on this one - so deep I cannot even provide any code to start with. I have a feature class that contains fields for: UNITS: Emmergency Service Vehicles YEAR: Year of a call the unit went on (4 years are covered) In this feature class there are multiple calls for each unit during each of the years. I have been asked to create a map which a user can select a unit, or multiple units, with a checkbox, and then in a different layer list select the year they wish to view, or multiple years. Example: I have UNIT A, UNIT B and UNIT C turned on (checked) in one list, I then turn on (check) 2010 and 2011 in another list and points populate the map that those units went on during those years. I have the feeling this might be a basic solution, but I cannot find an example. I am still a novice at Silverlight so this is not coming easy. Any recommendations would be extremely appreciated. Thank you
... View more
05-22-2013
11:12 AM
|
0
|
4
|
1519
|
POST
|
Hey All I have looked through quite a few of the posts on this process. I am using the find a feature on a map sample, modified slightly. When I click on a row in the datagrid I need the previous point, or polyline to go away. Right now I have a secondary symbol set up to show the selected street in black, when I click on the next street I need that previous selection to disappear. In the datagrid under the STREET tab, if there is a streetname with no address to its left - then that is an actual polyline from a street centerlines feature class. Click on one of those and you will see the zoom and the symbol change for the selected road. // JavaScript Document// JavaScript Document dojo.require("dojox.grid.DataGrid"); dojo.require("dojo.data.ItemFileReadStore"); dojo.require("esri.map"); dojo.require("esri.tasks.find"); dojo.require("dijit.layout.AccordionContainer"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.form.Button"); var findTask, findParams; var map, center, zoom; var grid, store; function init() { dojo.connect(grid, "onRowClick", onRowClickHandler); center = [-77.985, 39.450]; zoom = 11; map = new esri.Map("map", { basemap: "hybrid", center: center, zoom: zoom, minZoom: 11, maxZoom: 19, logo: false, sliderStyle: 'small' }); //Create Find Task using the URL of the map service to search findTask = new esri.tasks.FindTask("http://maps.berkeleywv.org/arcgis/rest/services/research_911/Operational/MapServer/"); dojo.connect(map, "onLoad", function() { //Create the find parameters findParams = new esri.tasks.FindParameters(); findParams.returnGeometry = true; findParams.layerIds = [0,1,9]; findParams.searchFields = ["FULLADDR","FULLNAME","INTERSECTION"]; findParams.outSpatialReference = map.spatialReference; console.log("find sr: ", findParams.outSpatialReference); }); } function doFind() { //Set the search text to the value in the box findParams.searchText = dojo.byId("ownerName").value; findTask.execute(findParams,showResults); } function showResults(results) { //This function works with an array of FindResult that the task returns map.graphics.clear(); var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([98,194,204]), 2), new dojo.Color([98,194,204,0.5])); var markerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 1), new dojo.Color([255, 119, 25, 9])); var intersectionmarkerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255, 255, 255]), 2), new dojo.Color([0, 0, 0, 8])); //create array of attributes var items = dojo.map(results,function(result){ var graphic = result.feature; //graphic.setSymbol(symbol); switch (graphic.geometry.type) { case "polygon": graphic.setSymbol(symbol); break; case "point": graphic.setSymbol(markerSymbol); break; case "polyline": graphic.setSymbol(lineSymbol); break; case "multipoint": graphic.setSymbol(intersectionmarkerSymbol); break; } map.graphics.add(graphic); return result.feature.attributes; }); //Create data object to be used in store var data = { identifier: "OBJECTID", //This field needs to have unique values label: "OBJECTID", //Name field for display. Not pertinent to a grid but may be used elsewhere. items: items }; //Create data store and bind to grid. store = new dojo.data.ItemFileReadStore({ data:data }); var grid = dijit.byId('grid'); grid.setStore(store); //Zoom back to the initial map extent map.centerAndZoom(center, zoom); } //Zoom to the parcel when the user clicks a row function onRowClickHandler(evt){ var extent; var clickedItemId = grid.getItem(evt.rowIndex).OBJECTID; var selectedItemId; var selectedlineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 10); dojo.forEach(map.graphics.graphics,function(graphic){ if((graphic.attributes) && graphic.attributes.OBJECTID === clickedItemId){ selectedItemId = graphic; return; } }); if(selectedItemId.geometry.type == "polyline"){ var itemExtent = selectedItemId.geometry.getExtent(); selectedItemId.setSymbol(selectedlineSymbol); map.setExtent(itemExtent); } if (selectedItemId.geometry.type == "point") { var itemExtent = selectedItemId.geometry extent = pointToExtent(map, itemExtent.x, itemExtent.y, 150); map.setExtent(extent); } } function pointToExtent(map, pointX, pointY, tolerance){ var xmin = pointX - tolerance; var ymin = pointY - tolerance; var xmax = pointX + tolerance; var ymax = pointY + tolerance; return new esri.geometry.Extent(xmin, ymin, xmax, ymax, map.spatialReference) } dojo.ready(init);
... View more
05-14-2013
11:49 AM
|
0
|
1
|
392
|
POST
|
I found the issue myself. It turns out that the attribute field names are not what I assumed they were. I did not realize this until I ran a FIND in my rest service.
... View more
03-25-2013
10:19 AM
|
0
|
0
|
152
|
POST
|
I have looked through numerous postos on this, but I cannot seem to solve my problem. The attributes are not populating my datagrid. If I use BJECTID or my GlobalID for the features the datagrid populates with that information, but no other attributes. The ZOOM to feature even works. Any assistance would br greatly appreciated Thank you. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>911 Research</title> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/grid/resources/Grid.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/dojo/dojox/grid/resources/claroGrid.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.3/js/esri/css/esri.css"> <script type="text/javascript"> dojoConfig = { parseOnLoad: true }; </script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2"></script> <script type="text/javascript" language="Javascript"> dojo.require("dojox.grid.DataGrid"); dojo.require("dojo.data.ItemFileReadStore"); dojo.require("esri.map"); dojo.require("esri.tasks.find"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); var findTask, findParams; var map, startExtent; var grid, store; function init() { dojo.connect(grid, "onRowClick", onRowClickHandler); var startExtent = new esri.geometry.Extent({"xmin":2328173.3028935865, "ymin":282104.61435875297, "xmax":2441858.2039148845, "ymax":411949.6673321724, "spatialReference":{"wkid":102750}}); map = new esri.Map("map",{extent:startExtent, maxZoom: 1, minZoom: 7, sliderStyle: "large"}); var countyLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://maps.berkeleywv.org/arcgis/rest/services/Berkeley_Boundary/MapServer", { }); map.addLayer(countyLayer); var roadsLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://maps.berkeleywv.org/arcgis/rest/services/Roads/MapServer"); map.addLayer(roadsLayer); var structuresLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://maps.berkeleywv.org/arcgis/rest/services/berkeley_structures/MapServer"); map.addLayer(structuresLayer); //create find task with url to map service findTask = new esri.tasks.FindTask("http://maps.berkeleywv.org/arcgis/rest/services/Berkeley_Addresses/MapServer"); //Create the find parameters findParams = new esri.tasks.FindParameters(); findParams.returnGeometry = true; findParams.layerIds = [0]; findParams.searchFields = ["FULLADDR"]; } function doFind() { //Set the search text to the value in the box findParams.searchText = dojo.byId("searchText").value; findTask.execute(findParams,showResults); } function showResults(results) { //This function works with an array of FindResult that the task returns map.graphics.clear(); var symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([0, 0, 0]), 1), new dojo.Color([255, 255, 0, 1])); //Create items array to be added to store's data var items = []; //all items to be stored in data store for (var i = 0, il = results.length; i < il; i++) { items.push(results.feature.attributes); //append each attribute list as item in store var graphic = results.feature; //variable for the point extent var pt = graphic.geometry; graphic.setSymbol(symbol); map.graphics.add(graphic); } //Create data object to be used in store var data = { identifier: "GlobalID", //This field needs to have unique values label: "GlobalID", //Name field for display. Not pertinent to a grid but may be used elsewhere. items: items }; //Create data store and bind to grid. store = new dojo.data.ItemFileReadStore({ data:data }); grid.setStore(store); grid.setQuery({ GlobalID: '*' }); //Zoom back to the initial map extent map.setExtent(startExtent); } //Zoom to the parcel when the user clicks a row function onRowClickHandler(evt) { var clickedGlobalID = grid.getItem(evt.rowIndex).GlobalID; var selectedAddress; for (var i = 0, il = map.graphics.graphics.length; i < il; i++) { var currentGraphic = map.graphics.graphics; //variable for the point extent //var pt = graphic.geometry; if ((currentGraphic.attributes) && currentGraphic.attributes.GlobalID == clickedGlobalID) { selectedAddress = currentGraphic; break; } } //add this code to set the point extent and zoom in var PointExtent = new esri.geometry.Extent(); PointExtent.xmin = selectedAddress.geometry.x - 5; PointExtent.ymin = selectedAddress.geometry.y - 5; PointExtent.xmax = selectedAddress.geometry.x + 5; PointExtent.ymax = selectedAddress.geometry.y + 5; map.setExtent(PointExtent); } dojo.addOnLoad(init); </script> </head> <body class="claro"> Owner name: <input type="text" id="searchText" size="60" value="COURTHOUSE DR" /> <input type="button" value="Search" onclick="doFind();" /><br /> <br /> <div id="map" style="width:1000px; height:800px; border:1px solid #000;"></div> <table dojoType="dojox.grid.DataGrid" data-dojo-id="grid" id="grid" rowsPerPage="5" rowSelector="20px" style="height:300px; width:1000px"> <thead> <tr> <th field="FULLADDR" width="100%">FULL</th> </tr> </thead> </table> </body> </html>
... View more
03-25-2013
09:57 AM
|
0
|
1
|
1965
|
POST
|
I am trying to create a SEARCH where the user types in a road name, and the display box shows all addresses that fall under that road name. The user can then select the address they want and the map will auot zoom to that point. I have seen some posts close to this, but not quite what I need. Can anyone get me started in the right direction? Thank You
... View more
10-31-2012
05:08 AM
|
0
|
2
|
458
|
POST
|
Very nice tool However; I am attempting to adjust it's display location. The task looks pretty simple after looking at the code, but I am not able to move the widget to the right side of the display. I am attempting to place it right="20" top="70", but it is not moving. Is there something I am missing, or is the a locked feature. Thanks Jeff Frye Berkely County, WV
... View more
07-18-2012
11:01 AM
|
0
|
0
|
356
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|