Hot answers tagged

7 votes

How to Hide InfoWindow/Popup when "no information available" or when buffering?

This question is a year old but this alternate solution may be helpful to others. If you are using the Popup class you can set the Popup to a global variable so that you can set it not to show the ...
user avatar
  • 316
6 votes

Moveable ArcGIS Identify Popup Window (Dojo)

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 ...
user avatar
  • 431
5 votes
Accepted

ArcGIS Javascript API AMD require syntax and Dojo ContentPane compatibility

Include the dojo/parser and dojo/domReady! modules. Just like in this example https://developers.arcgis.com/javascript/jssamples/widget_basemap.html domReady will ensure that your DOM is loaded, the ...
user avatar
4 votes
Accepted

Programmatically accessing declarative ToggleButton?

definitely a scope problem. check out this sample which includes an example of wiring up a Dijit event listener within a require callback in JS instead of declarative HTML. registry.byId("...
user avatar
  • 5,053
4 votes

uncaught type error:dom is undefined

The array of module IDs passed to require includes "dijit/form/Button" but there's no alias for it in the callback. Add Button, between Color, and on, in the arguments for your function that's ...
user avatar
4 votes
Accepted

Customizing ArcGIS API for JavaScript widget?

it is possible read this document for example : firstly set dojo config dojoConfig = { parseOnLoad: false, packages: [{ "name": "customWidget", "...
user avatar
3 votes
Accepted

FeatureLayer fullExtent is being constricted by Dojo ContentPane side panel

Try calling map.resize() after the ContentPane is rendered and the map div resized. You may also have to use map.reposition() depending on if the div was moved or not. Edit, in response to your ...
user avatar
  • 2,358
3 votes
Accepted

Takes Two Clicks to Select New Feature

Change popup.on("selection-change", function(){ to popup.on("set-features", function(){
user avatar
3 votes
Accepted

ESRI JavaScript API FeatureLayer Click Event

i'm not sure why .disableMouseEvents() stopped working after 3.9, but you can use map.setInfoWindowOnClick() instead. here's a working sample.
user avatar
  • 5,053
3 votes

Using legend with dijit/form/DropDownButton in ArcGIS API for JavaScript?

you don't necessarily need a dropdown. any button will do. you just need to work on ensuring that clicking the button alters the .css appropriately. this is a mostly completely unrelated code ...
user avatar
  • 5,053
3 votes

Adding NOAA Radar to JavaScript Application

It looks like the problem is that the spatial reference of this map is not the standard Web Mercator, but is 4269. You'll notice if you go to the REST service, it will show up when you click on the ...
user avatar
  • 5,288
3 votes
Accepted

Using Multiple Versions of ArcGIS API for JS in Same Application

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) ...
user avatar
3 votes
Accepted

ArcGIS JS API: Basic map not loading inside dojo BorderContainer

It looks like you may be missing the esri.css file. Make sure you have included the following in your HTML file. <link rel="stylesheet" href="//js.arcgis.com/3.17/esri/css/esri.css">
user avatar
3 votes
Accepted

lang.hitch use in ArcGIS API for JavaScript

require(["dojo/_base/lang"], function(lang){ var myObj = { //A simple object with the property of foo foo: "bar" }; var func = lang.hitch(myObj, function(){...
user avatar
2 votes

Make InfoTemplate moveable but still highlight attributes

Try this: Instead of making the whole popup box moveable, which is preventing you from interacting with text inside the box, make only the title bar (where the title and close button is) moveable. ...
user avatar
  • 1,078
2 votes

Synching Two ArcMap JavaScript webmaps to respond to panning

You could try something like this: esriConfig.defaults.map.panDuration = 0; dojo.connect(map1, "onPan", onPan); function onPan(extent, delta) { map2.setExtent(extent); } This will add an event ...
user avatar
2 votes

Use Dojo to load modularized widget config files

If I understand your question correctly, Use dojo/text! and JSON.parse to grab config: Assumes directory structure something like: /src/js/MyWidget - /templates - MyWidget.html - MyWidget.js ...
user avatar
2 votes

How to re-implement a Dojo application using Leaflet?

i wrote a quick example of loading dojo and leaflet in the same application here that being said, if you are committed to using dojo, it probably makes more sense to maintain a mapping application ...
user avatar
  • 5,053
2 votes

ArcGIS Javascript API on Wordpress 4.1

SOLUTION: For everyone interested: turned out the solution was moving all files that use DoJo beneath the jQuery UI files, so that jQuery UI is fully loaded before any DoJo stuff loads. Moved them all ...
user avatar
2 votes
Accepted

ArcGIS Javascript API on Wordpress 4.1

I removed the Jquery UI scripts at the end of the page in https://tpgrf.nl/testserver/alpha/topotrainer/provincies/. All those scripts start with the base URL https://tpgrf.nl/testserver/alpha/wp-...
user avatar
2 votes
Accepted

Plotting the centroid of a polygon feature layer

Set the geometry for the graphic using the setGeometry method. Also set the symbol on the graphic OR you may change the renderer (using marker symbols) on the featureLayer when the featureLayer loads. ...
user avatar
2 votes

Can't close custom Web AppBuilder widget programmatically

the first thing that I noticed, is the WidgetManager.getInstance is a function, which means you need to call it using WidgetManager.getInstance() I haven't worked with the web app builder yet, but ...
user avatar
2 votes

Getting event object from Draw Toolbar onDrawEnd using ArcGIS API for JavaScript?

Attach to the keydown and keyup events. When the "draw-end" event fires use the "IsShiftDown" to see if the shift was being held down. require(["dojo/on", "dojo/domReady!"], function(on) { var ...
user avatar
  • 843
2 votes

Using legend with dijit/form/DropDownButton in ArcGIS API for JavaScript?

@John Gravois provided a solution. I used dojo/fx/toggler to solve my problem. I also found the dropdown menu solution. Both work equally well, so it is merely a matter of preference: var ...
user avatar
2 votes

uncaught type error:dom is undefined

You are also missing the alias for "dijit/Toolbar". A more basic programming note is that you don't need dojo.parser.parse(); var firstBasemapLayer = new esri.dijit.BasemapLayer({ var firstBasemap ...
user avatar
  • 5,288
2 votes
Accepted

Esri API JS, popup not displaying after first click

I started removing pieces and found a piece that I didn't completely understand what it was doing and pulled it out. map.on("click", function (event) { var query = new Query(); ...
user avatar
  • 269
2 votes

Getting vertices of segment of polyline using ArcGIS API for JavaScript?

Sorry, I didn't know you were using Java API when I wrote my answer. You are very brief in the explanation of your problem, but I assume you would like to get point features. In order to get the ...
user avatar
  • 1,457
2 votes
Accepted

ESRI JS API - Unable to register Basemap Gallery (ID is already registered)

It's incorrect to assign a dijit in Refnode param BasemapGallery(maps.basemapGalleryParams,layout.cpRight);. So, you have to a assing a dom node in that params , in your case to prevent the ...
user avatar
  • 947
2 votes
Accepted

How open Web AppBuilder widget programmatically?

This function works for me: _openPanelWidget: function (aWidgetId) { var def = new Deferred(); var wm = WidgetManager.getInstance(); var myWidget = wm.getWidgetById(aWidgetId); if (...
user avatar
  • 295

Only top scored, non community-wiki answers of a minimum length are eligible