POST
|
Another great editor that you can use for free until you love it so much you want to pay for it, is sublime text. http://www.sublimetext.com/ I don't bother with codeassist kinds of things (too lazy or something), so I'm not sure if it supports it. ken.
... View more
12-09-2013
06:33 AM
|
0
|
0
|
733
|
POST
|
Glad you found a solution. Sorry for putting you on the wrong trail!
... View more
10-30-2013
06:56 AM
|
0
|
0
|
432
|
POST
|
You might try a strategically placed "console.dir(attrName)" to see exactly what is coming back. https://developers.arcgis.com/en/javascript/jsapi/graphic-amd.html#attributes indicates it is an object with a name/value pair, so you'll probably need to do something like: attrName.name in order to get the column name. "...and no more rhyming now... I mean it!" ken.
... View more
10-29-2013
08:04 AM
|
0
|
0
|
632
|
POST
|
In the eternal words of Vizzini, "I do not think attName means what you think it means." 🙂 Ok, sorry, it is a Tuesday... At first glance, I think the attName you're getting back from iterating over that first row of attributes (dataList.data[0]) isn't a column name and that is throwing things off. Hope that helps! ken.
... View more
10-29-2013
07:00 AM
|
0
|
0
|
632
|
POST
|
Hi Lee, It would be great if you would explain what steps you needed to take that got you over the hump for posterity (and help improving documentation!). Also once you post your answer, make sure to mark it as the answer (check the green check mark after you post it) for this question. That way other folks searching the forums might find it later and you'll be helping them. Awesome! We customized the Tax Parcel Viewer template quite a bit and have been very happy with it, too. ken.
... View more
10-14-2013
06:48 AM
|
0
|
0
|
615
|
POST
|
I didn't find an outright solution, but I changed how I was working with the map and it works now. What I wanted was for a user to be able to add a point to a map and (if they wanted to move the point) they could click a different spot and the point would appear to move: it would add the new point to the new spot and then remove the previous point they added. This worked fine the first couple of points the user clicked, but then I would start getting the above error. I changed my strategy to just working directly on the map and not calling applyEdits with each click. Then when the user finishes with the point they want, they click a save button. Not a solution, put probably a better implementation for my particular case. The feature class backing my service was registered as versioned, so I don't know why it seemed to be having trouble with multiple edits... ken.
... View more
10-09-2013
06:44 AM
|
0
|
0
|
922
|
POST
|
Good morning! 1. Yes you can have a basemap-less map in the JSAPI (since 3.3, I think). If you open the developer console on the browser, is it giving you an error? Also, obviously, if you don't provide a basemap and aren't providing any layers then there won't be anything to see. 🙂 2. The Javascript API is geared for living in a connected browser consuming REST services from an ArcGIS Server and while someone has probably whipped up a REST server for local shapefiles, that probably isn't the best way to go. Because the JSAPI is based on Dojo that supports disconnected Stores, another possible solution might be for your javascript application to connect to and locally store the data from your ArcGIS Server services. But probably a better way to have a disconnected tablet app is to use the Android or IOS sdk and build one that directly connects to your shapefiles. You might explore some of the samples linked to from the appropriate tablet OS you'd be targeting: https://developers.arcgis.com/en/documentation/ Good luck! ken.
... View more
10-08-2013
07:20 AM
|
0
|
0
|
470
|
POST
|
albertoaloe, We've had issues with this as well and had a discussion about it in this thread: http://forums.arcgis.com/threads/80495-Print-Secure-Services-using-10.1-Print-Service We were able to do a workaround for our internal users (block at the firewall, leave unsecured so it can print). Otherwise I'm hoping this is a bug that is fixed in 10.2, though I haven't yet confirmed that. ken.
... View more
10-03-2013
06:52 AM
|
0
|
0
|
258
|
POST
|
I agree and found the swallowing of errors a difficult and frustrating problem as I've been learning Javascript and JSAPI. I've ended up doing the same strategy when something is just quietly failing, I find and wrap the code (once I figure out where it might be dying!) with a try/catch block and pass the exception to my error handler. It would be GREAT if ESRI added a noisy default error handler, at least in some kind of a debug mode. I guess this is basically a worthless "me too" post, but at least I feel better. 🙂 thanks, ken.
... View more
09-23-2013
07:38 AM
|
0
|
0
|
770
|
POST
|
For your first question, yes, you can do that. When you want to display just the features in each featurelayer with a specific CODE then you would just iterate over the layers you've defined and call "setDefinitionExpression" with a query like "CODE = 'value'". It will then display just those features that match the query. Here is a link to the documentation: https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#setdefinitionexpression For your second question, I don't know! 🙂 Maybe someone with more experience with that can chime in. I'm sure you can do a query by geometry from one service to the other, but maybe there's a way to do it more elegantly. Perhaps this feature would be helpful: https://developers.arcgis.com/en/javascript/jsapi/intersectinggeographies-amd.html It also has a link to samples. Good luck! ken.
... View more
09-19-2013
07:13 AM
|
0
|
0
|
437
|
POST
|
Hi guys, What I do is define a function "is_empty" that helps in these situations: function is_empty(obj) {
// null and undefined are empty
if (obj == null) return true;
// Assume if it has a length property with a non-zero value
// that that property is correct.
if (obj.length && obj.length > 0) return false;
if (obj.length === 0) return true;
//if an object, does it have any values in any of its properties?
for (var key in obj) {
if (hasOwnProperty.call(obj, key)) return false;
}
// Doesn't handle toString and toValue enumeration bugs in IE < 9
return true;
} Then you can: if(!is_empty(f.attributes["Topo_URL"]) && !is_empty(f.attributes["Web_URL"])) It doesn't add in dojo.trim, but that's easy enough to add if you want.
... View more
09-19-2013
07:01 AM
|
0
|
0
|
657
|
POST
|
Hi Phuong, I think you are right to study that sample. It is very similar to what you are trying to do. What specifically are you having trouble with? Can you post some code? We don't want to do your work for you, just help if you get stuck. 😉 ken.
... View more
09-19-2013
06:52 AM
|
0
|
0
|
357
|
POST
|
boss182, If I understand, I think your next step is to move your shapefiles into a geodatabase and then publish them as services. To do that you'll need to use ArcMap to create a geodatabase on a database server (or maybe you have one already and just need to import those shapefiles?) and then create a map that uses those feature classes. Then you can publish that map as a service that will contain those features and make them available as services on your ArcGIS Server. Alternatively to all of that, you can use ArcGIS Online if you have a subscription. Once you have those magic services available, then you can write your javascript to consume them and do wonderful things. 🙂 Hope that helps! Feel free to explain more of what you need if I'm off the mark. Good luck! ken.
... View more
09-18-2013
07:36 AM
|
0
|
0
|
437
|
POST
|
Hi Chiru, Like ZachLiu said, you'll need to create an empty feature class and publish it as a map service in order to be able to create features and save them as edits. One way you could make something that works like mapsengine would be to add a field to your new feature class called something like "EngineLayerId". Then when your user creates a new layer, what you do is just add a query ("definition expression") to the feature service for the new EngineLayerId that would return just the features marked for that sort of "virtual" layer. (I would also create another table called "EngineLayer" where you track these id's and most likely give them a name and associate them with your users, etc.). This way, you are only showing a specific set of features at a time, which to your users would be very much like their own layer. Here's the FeatureLayer.setDefinitionExpression docs: https://developers.arcgis.com/en/javascript/jsapi/featurelayer-amd.html#setdefinitionexpression There are probably other ways to do it, but making virtual layers with a query from a single feature service would be simple and might do just what you want. Good luck! ken.
... View more
09-18-2013
07:23 AM
|
0
|
0
|
253
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|