POST
|
Ken Doman makes a good point about map on load. I don't do anything, including loading layers, until the map is loaded. However I'm specifying a basemap. The map will set the sr based on the first layer added. You might try not specifying the sr in the map constructor, add a layer and wait for map on load to continue loading the app. Also 3.12 introduced esri/basemaps | API Reference | ArcGIS API for JavaScript so you could provide your custom basemap in your sr in the map constructor.
... View more
02-12-2015
11:29 AM
|
0
|
1
|
854
|
POST
|
That's a problem. Are you sure it's not originating from the require/define where the map instance is created?
... View more
02-12-2015
07:38 AM
|
0
|
1
|
854
|
POST
|
Does your app work as expected despite the error? The reason I ask is around v3.0 I would get the same intermittent error but the app otherwise had no issues as a result. I haven't seen it some time though. While annoying I think you can safely ignore it if the app has no issues as a result.
... View more
02-12-2015
06:59 AM
|
0
|
3
|
854
|
POST
|
When layer option `visible: false` the layer is not visible but `someGeoRssLayer.visible === true`. Edit fiddle - JSFiddle Must toggle to get in sync, which is a problem when one wishes to know it's actual state when loaded.
... View more
11-06-2014
02:39 PM
|
0
|
0
|
442
|
BLOG
|
See an implementation with my CMV MapInfo widget or the StreetView widget.
... View more
11-03-2014
11:01 AM
|
1
|
0
|
1229
|
POST
|
Kelly Hutchins Any chance layers could inherit `dojo/Stateful` in 3.11? I can submit an enhancement request on this. Also, what do you think about dynamic emitting an event on sublayer change returning both old and new arrays? The above would work to, but an event would be handy. If you think this might be worth while I'm submit it too.
... View more
09-26-2014
03:29 PM
|
0
|
1
|
890
|
POST
|
Richard, Scott's right. Looks like you're using legacy. Consider switching to AMD.
... View more
09-24-2014
09:13 AM
|
0
|
0
|
692
|
POST
|
The method set setInfoTemplate() belongs to the feature (graphic) not the feature's infoTemplate object.
feature.setInfoTemplate(infoTemplateUtilities)
The popup is fully customizable w/ css. Look it up with dev tools. It's a div in the map dom node w/ base class "esriPopup".
... View more
09-24-2014
08:26 AM
|
0
|
4
|
692
|
POST
|
Hey Tim Witt. Somebody pointed out your Advanced Draw fiddle to me the other day. Nice work. Just realized it was yours. I'm updating/reworking my draw module for another project. You have a quite a bit of the same features but here's my old one hardcider/viewer/js/hardcider/draw at master · btfou/hardcider · GitHub. It just provides methods (dev must provide buttons, etc in app) but the new one will be an all encompassing templated widget.
... View more
09-23-2014
12:00 PM
|
0
|
0
|
952
|
POST
|
Tim, Check this out hardcider/Measure.js at master · btfou/hardcider · GitHub . It's a tooltip updater method in my measure widget. Look at line 218. You need to call the toolbar's _setTooltipMessage() method every time you want the tooltip to update. This widget relies on helper methods extending esri/map. this.map.setDrawTooltips({}) calls this method:
//set/reset draw tooltips
setDrawTooltips: function(draw) {
draw = draw || {};
var defaults = {
addMultipoint: 'Click to start adding points',
addPoint: 'Click to add a point',
addShape: 'Click to add a shape, or press down to start and let go to finish',
complete: 'Double-click to finish',
finish: 'Double-click to finish',
freehand: 'Press down to start and let go to finish',
resume: 'Click to continue drawing',
start: 'Click to start drawing'
};
lang.mixin(esriBundle.toolbars.draw, defaults, draw);
}
... View more
09-23-2014
07:15 AM
|
2
|
2
|
952
|
POST
|
As the someLegendId_msg div gets destroyed and recreated (and w/o and event) css can not easily be applied. Thanks.
... View more
09-21-2014
09:15 AM
|
0
|
7
|
1855
|
POST
|
Booya! Take saving a map for example. You're sure to save the extent as JSON. But when you load it you cannot just pass the saved map JSON as map options. You need to replace the extent JSON with an Extent object.
//this would be nice
var map = new Map('map', {
basemap: 'topo',
extent: {xmin: -13715559, ymin: 5756224, xmax: -13709826, ymax: 5759855, 'spatialReference': {'wkid': 102100, 'latestWkid': 3857}}
});
Imagine setting up/executing a query or find task by simply passing JSON! Another similar situation:
var graphicJson = someGraphic.toJson();
var newGraphic = new Graphic(graphicJson);
//Graphic accepts json containing any or all 4 parameters
//but using individual geometry, symbol and infoTemplate parameters require initiating new objects
//why not also
var anotherGraphic = new Graphic(geomJson, symJson, attributes, itJson);
//can easily create graphic JSON but would be nice if parameters excepted JSON too
//along the same lines
anotherGraphic.setSymbol(newSymJson);
... View more
08-15-2014
03:57 PM
|
1
|
0
|
316
|
POST
|
Now:
lang.mixin(new ImageParameters(), {dpi: 96, format: 'PNG32'})
But why not:
new ImageParameters({dpi: 96, format: 'PNG32'})
Please add constructor options to classes such as ImageParameters, FindParameters, etc. Seems like an easy fix. It's literally adding an arg and one line of code to the constructor.
... View more
08-15-2014
01:43 PM
|
1
|
2
|
2384
|
Title | Kudos | Posted |
---|---|---|
1 | 06-18-2013 06:56 AM | |
1 | 06-30-2015 09:17 AM | |
1 | 05-28-2015 11:08 AM | |
1 | 10-12-2013 07:14 AM | |
1 | 05-28-2015 11:41 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|