New answers tagged

2

This blog has an excellent example of how to make the window draggable and hide the arrow using dojo: https://gavinr.com/2015/04/13/arcgis-javascript-draggable-infowindow Here's the key javascript snippet: require([ 'esri/arcgis/utils', 'dojo/dnd/Moveable', 'dojo/query', 'dojo/on', 'dojo/dom-class' ], function ( arcgisUtils, ...


1

You got this error because you are trying to get an Extent of point geometry , so the Point geometry does not have an extent like (polyline,polygone ...) the school feature layer is a esriGeometryPoint Layer , so you cant work with extents here : I used the centerAndZoom map function to zoom to the returned point geometry , and i've add graphic for ...


2

the code snippet you've provided throws an error because you're making the request to an invalid url (FeatureServ/0/ instead of FeatureServer/0/). that said, you're also passing quite a few undefined/invalid parameters. geometry: undefined outFields: undefined text:"" some things to keep in mind: a point will never intersect another point unless they ...


0

the error : can't read property 'toJson' of null , exactely here means that the widget tries to convert the geometry to a json object and he cant resolve this field (geometry). In your featureLayer search refered to the url service : ...


1

GitHub doesn't let you host server side applications, so you cannot run your proxy there. http://stackoverflow.com/questions/15718649/how-to-publish-a-website-made-by-node-js-to-github-pages


1

vince is right. when you need functionality that was introduced in a specific release of the ArcGIS API for JavaScript (or any API for that matter) the only way to get access to it is to utilize the version where its present. https://developers.arcgis.com/javascript/jshelp/new_v313.html


4

No, this isn't possible. For one, if you were to load both API's, you would end up with a namespace collision with Dojo's Define and Require. For two, the API is obfuscated (not human readable) making it difficult to extract just the parts you need. Even if you could, there may be dependencies in that module preventing you from using it with an older API.


0

If you look at my answer here: http://gis.stackexchange.com/a/183908/15647 You'll find a way of accomplishing this. You'll need to make sure your JSON is formatted correctly. It doesn't look quite right to me, but it can probably be tweaked, there's some JSON example in the question I linked to as well and all you really need in JSON is the Layer ...


1

This is a very simple way to do what you need: https://output.jsbin.com/gijokewena You just define an array or object of layers with url and renderer (if it's needed) and then a function that load one of the layers using an id or key. I hope this help you.


0

Application authentication does allow for editing of a hosted feature service. Create/update/delete user's content This limitation is a little misleading. 'User content' is more the items owned by the named user. e.g. editing an item to change the title or description as opposed to editing data in a feature service. A proxy will still be required (to ...


1

Like @ahammadalipk points out it's a CORS issue and not specific to the JSAPI. I don't think sampleserver1 supports CORS (it's an old server). Another alternative is to use a proxy. See https://developers.arcgis.com/javascript/jshelp/ags_proxy.html Or maybe take a step back. Depending on what you are trying to do, you might want to test with a newer ...


1

When you say "I tried to use another geometry server, but the problem is obviously not there", do you mean it works with other GeometryServices but not the one hosted on tasks.arcgisonline.com? Either way, https://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer is an old server (10.0) that you probably shouldn't be using. The sample you ...


2

Currently the extrusion you are setting in Pro that would go towards publishing a feature service in AGOL is not supported in the scene viewer. You can do this in code with the JS API 4.0(currently in beta, final coming soon!). Check out this blog to help you get started: ...


3

Kirk is right on the money, with the exception of one statement. If your mapservice url is public, and you have an ArcGIS Online account, you can create an app without coding. As long as you have access to the internet, it is possible to create webmaps and applications in ArcGIS Online that reference an instance of ArcGIS Server that is behind a ...


3

Instead of trying to "customize the map service", I recommend leaving the map service as-is, and writing apps that use the map service. You can write such an app by starting with the sample code in the ArcGIS API for javascript. If you don't want to write code, you can use the Web Appbuilder. If your mapservice url is public (i.e. accessible from outside ...


0

it all depends on what parser you use: if you are using VB, this is the correct syntax for a new line & vbnewline &. add this between your 2 fields or expressions


2

EDIT: I've changed the alias of the field in ArcMap and that persists in the feature service. But, I'm still wondering: How do I change the number format used in the dijit Legend? (I would like to display rounded numbers and percentages.) so I'm not completely sure that this what you are looking for, but inside Arcmap, if you open an attribute ...


0

API Reference For a class breaks renderer, the class breaks are objects stored in the array infos. minValue, maxValue, and label are all properties of these objects. So, when you generateRenderer, rather than calling applyRenderer immediately, first modify these properties. So here I build a label for each object (0-4 for a 5 class renderer) based on ...


0

the locateButton widget is designed for retrieving the dynamic locations of end users using HTML5 geolocation. if you want a button which centers the map on a static location, please check out the homeButton widget.


0

From the API reference: The Search widget provides a way to perform search capabilities based on locator service(s) and/or map/feature service feature layer(s) https://developers.arcgis.com/javascript/jsapi/search-amd.html As you speculated in your own question, a CSVlayer is not one of the widget's supported inputs.


0

This is the CORS issue, you need to enable JavaScript in sample server,basically server will block JavaScript request unless you give JavaScript permission.


0

I finally figured out that I was missing the following piece of the puzzle: map.on("load", function(evt) Once I got that piece and the html code, my app works well.


0

layer parameter in the layerInfo of the legend class can only be ArcGISTiledMapServiceLayer and ArcGISDynamicMapServiceLayer type. you have in your code FeatureLayer type that's why it incompatible with Legend class. for more detailed info : https://developers.arcgis.com/javascript/jsapi/legend-amd.html


0

you can try this: require([..],function(...){ esri.config.defaults.io.corsEnabledServers.push(window.location.hostname) ..... })


0

You should correct your objectid value type from string to number. your request is here : updates:[{"attributes":{"objectId":"43532","mutcd":"D3-1 (Street sign) - Street Name & Parking Signs","installed":null,"signId":"5912","facing":"N","visibility":"Good","condition":"Good","supportId":"3680","text":" ...


0

See kenbuja's comment for answer. See here: https://geonet.esri.com/thread/174090


2

The alias is being read from the underlying database, so you need to change the alias in the feature class. The alias property is just a read only value of a field in the JavaScript API.


0

In one of my applications, I'm using a combobox "cboDisplay" that switches the renderer for a featurelayer and updates the legend. The renderers were UniqueValueRenderers registry.byId("cboDisplay").on('change', function (evt) { var legendTitle = this.domNode.innerText; switch (evt) { case 0: ...


0

obviously you still have the legacy code there, see "dojo.promise" part in your question. Wherever in your code you have this, you need to wrap it in the "require" or create your own module. // from dojo documentation on promise/all require(["dojo/promise/all"], function(all){ all([promise1, promise2]).then(function(results){ // results will be an ...


2

The CMV Editor widget is just a wrapper for the ESRI Edit toolbar and the desired configuration is passed along to the ESRI toolbar. Whether you can add/edit/delete features using the ESRI editor toolbar is mostly determined by the operational layer not the configuration for the CMV widget. First, the layer in the Feature Service on your ArcGIS Server must ...



Top 50 recent answers are included