|
POST
|
if I add the /0 at the place where I create and add my dynamic map service layer, my parcels layer does not load. This is because when you specify a dynamic layer, you omit the layer identifier from the URL, but when you specify a feature layer or query, you need to specify the layer. How do I go about making sure BOTH things happen on a click of the map? Search the file layout.js for the section:
dojo.connect(map, "onClick", function(evt) {
identifyLocation(evt.mapPoint, operationalLayers);
});
This is where the code specifies that the Identify should run when you click on the map. If you add your code here, it will also run when you click on the map. I get mixed up about what javascript I should add in the layout.js file and what should be added to index.html. For example, do I initialize the event listener, query task, query filter, and symbol properties in the init function of index.html, or in the initMap function of layout.js? I'm not an expert on this, but my two cents is that either way will work, so there's no one "correct" answer. It's generally considered more robust to keep your application modular, so that (for example) the .HTML file contains the page elements (the map, scalebar, header, etc) the styling is stored in a separate .CSS file, and the logic is contained in .js files. As long as you reference the JS files from within the HTML file, it will work. Good luck, Steve
... View more
02-05-2012
01:26 PM
|
0
|
0
|
2267
|
|
POST
|
I think you were missing two crucial steps. 1. You need to specify which fields the query should return:
query = new esri.tasks.Query();
query.returnGeometry = true;
query.outFields = ["*"];
2. The query needs to run against an individual layer (the last bit of the URL):
queryTask = new esri.tasks.QueryTask("http://gis.chcity.org/CHwebMaps/rest/services/CityData/Parcels_SD/MapServer/0");
If I make these changes, the parcel is highlighted in yellow after clicking. Cheers, Steve
... View more
02-02-2012
04:18 PM
|
0
|
0
|
2267
|
|
POST
|
Sounds like just the shortcut I was looking for - thanks! For reference the Context Menu sample is here if anyone else needs it.
... View more
02-02-2012
01:58 PM
|
1
|
0
|
1817
|
|
POST
|
Sorry, I can't really help here. In FireFox on a PC, the features are deleting correctly. I don't have access to an iPad or Mac to test this in iOS. It might help to make a much simpler version of this application, which you can debug more easily. I'd create a version of this page with all the code in a single script then add a single layer and a simple add/delete function, then see if you can reproduce the problem. That might help to pinpoint exactly where the problem is occurring - if you submit something as complex as this applicatoin to tech support, it'll be harder for them to debug. Good luck, Steve
... View more
02-02-2012
01:51 PM
|
0
|
0
|
1520
|
|
POST
|
Hi Ed, Good suggestion - but I'm looking for something a lot simpler, like the polygon in the Overview map, where you can just pick it up and move it. I don't want to create a feature layer, start an edit session, etc. I've got a workaround using the method above - I'm just wondering whether there's a more efficient way to do it. Cheers, Steve
... View more
02-02-2012
12:58 PM
|
0
|
0
|
1817
|
|
POST
|
Can you pinpoint the relevant sections in the code? It's a fairly complicated application so it would help to narrow down the issue. Which functions in the application should we choose to reproduce the problem? I noticed in the script at http://arcgisserver.northwind-inc.com/itd-mobile/library/code/global.js that you've defined:
permits = new esri.layers.FeatureLayer("http://arcgisserver.northwind-inc.com/ArcGIS/rest/services/itd-mobile/FeatureServer/1", {
mode : esri.layers.FeatureLayer.MODE_ONDEMAND,
disableClientCaching : true,
visible : false,
outFields : ["*"] });
As far as I know, disableClientCaching doesn't apply to a feature layer, but to a Dynamic layer. Not sure if that's related to the issue you're seeing. Cheers,Steve
... View more
02-02-2012
12:53 PM
|
0
|
0
|
1520
|
|
POST
|
Derek Swingley provided some sample code for dragging and dropping a graphic point. What is the best procedure for dragging and dropping a graphic polygon? (I'm happy to limit this to a rectangular shape if that's easier than working with a complex polygon.) Given that the transformation is shown in page units, do I need to: get the xmin,xmax,ymin,ymax of the original graphic in map units generate the 4 corners as individual Point objects in map units convert these points to page units apply the transformation to each point in page units convert the points back to map units generate a new geometry from the new points apply this geometry to the polygon This seems a bit convoluted. Is there a faster way to obtain the coordinates of the graphic after it's been dropped? Thanks, Steve
... View more
02-01-2012
06:29 PM
|
1
|
4
|
3884
|
|
POST
|
See the sample overview window map - when panning in the main map, the overview window rectangle re-centres within on the overview map, which pans to accommodate this, after each map extent change. Is it possible to disable this, and firmly fix the overview map's extent? This would mean that the overview rectangle moved around within a fixed overview map, which itself didn't pan. I'm assuming that the answer is no, and that I'll need to create two separate maps and link them manually - but I thought I'd check first to save time. Thanks, Steve
... View more
02-01-2012
01:15 PM
|
0
|
1
|
769
|
|
POST
|
Patrick, I'm not an expert on jQuery, but I think you might want to put the jQuery code outside of the infoWindow, and in the main JS section of your page:
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
})
... View more
02-01-2012
01:10 PM
|
0
|
0
|
896
|
|
POST
|
There's no single correct answer, but if you were to use the JavaScript API you won't need any plugins (like Flash or Silverlight) so your application has a better chance of working on mobile browsers. Since you don't mention Android or iOS specifically, you could start by reading about the Compact Build of the JS API. If you were targeting Android or iOS you could look at the dedicated APIs for those operating systems. Good luck, Steve
... View more
02-01-2012
12:59 PM
|
0
|
0
|
580
|
|
POST
|
I am thinking it has something to do with different spatial references but am able to get my head around the problem. Rory, See the sample Set Custom Extent and Spatial Reference for the missing bit in your code, which is indeed the spatial reference. Steve
... View more
01-29-2012
12:40 PM
|
0
|
0
|
915
|
|
POST
|
I have a dynamic environment where attribute data is changing frequently. This is managed by a 3rd party system so I'd prefer not to store the attribute information in a polygon featureclass in a geodatabase. Instead, I'd prefer to have the polygon boundaries stored in the featureclass, and the attributes stored in a geodatabase table. Can I build a featureLayer on-the-fly from the boundaries and attributes, by joining them on a primary key? Are there any sample scripts showing this? Thanks, Steve
... View more
01-23-2012
04:36 PM
|
0
|
2
|
1078
|
|
POST
|
In the ArcGIS Server JavaScript API 2.6 I'm looking to implement map graphics. I can't see whether they support time-awareness. The help entry for graphicsLayer doesn't mention timeInfo, which is mentioned for featureLayer. A featureLayer is a type of graphicsLayer - but does this mean that time-awareness is only implemented at the featureLayer level? Rather than using a graphicsLayer, do I need to generate a featureLayer on-the-fly using a featureCollectionObject in order to access time-awareness and use the TimeSlider toolbar? Thanks, Steve
... View more
01-23-2012
01:52 PM
|
0
|
2
|
1159
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2014 08:45 PM | |
| 1 | 03-15-2011 04:23 PM | |
| 1 | 10-18-2019 12:50 AM | |
| 3 | 01-22-2019 02:33 PM | |
| 1 | 09-26-2011 10:36 PM |
| Online Status |
Offline
|
| Date Last Visited |
10-20-2022
12:19 AM
|