POST
|
Robert, This is the code I am using, I really just know the portalId of the basemap. var basemapNew = new Basemap({ portalItem: { id: portalid } }); myMapView.map.basemap = basemapNew; // "layerview:spatial-reference-incompatible" is logged to the console and the basemap property set fails if the new basemap is in a different SR If I could trap that "layerview:spatial-reference-incompatible" state, I could handle the problem after setting the basemap, but I have not been able to find a way to do that.
... View more
11-16-2017
10:15 AM
|
0
|
3
|
1352
|
POST
|
Thank you, but I am trying to get the spatial reference without loading it into the map. I am trying to accurately predict whether a "swap" of the base map is going to fail due to "layerview:spatial-reference-incompatible".
... View more
11-16-2017
08:56 AM
|
0
|
5
|
1352
|
POST
|
Is there a way to get access to the spatialReference of the basemap? This seems like it should be simple. I should be able to create the basemap from the portalId and check the spatial reference to predict whether the load will fail. I have tried checking baselayers, I have tried calling .load on the basemap and .load on the baselayers then checking the spatialReference. It is still null. Will Esri eventually handle changing spatial references of a mapview when a user chooses a basemap that is in a different spatial reference from the currently loaded mapView?
... View more
11-16-2017
04:41 AM
|
0
|
9
|
2097
|
POST
|
One more clarification on this issue. Map Image Sub Layer items work okay as long as they are not grouped. Grouped Map Image Sub Layers are the issue. The ConfigureCustomActions is never called for Grouped Map Image Sub Layers so there is no possibility of adding custom actions.
... View more
06-26-2017
04:21 AM
|
0
|
0
|
254
|
POST
|
I noticed that we can define custom actions in layer list widgets for feature layers, and for map image layer root items. However, you cannot define custom actions for map image layer sublayer items. The createActionsFunction gets called for these items, but any custom actions you add are not added to the node. Am I missing something or is this a limitation of the LayerList widget?
... View more
06-14-2017
01:48 PM
|
0
|
1
|
532
|
POST
|
I am sorry. I feel like I must be missing something here, but when I launch that sample in a new incognito window, I see the social logins displayed. This is what I see (with the facebook and G+ icons present). Is this what I should see on the default version of this sample?
... View more
04-26-2017
09:39 AM
|
0
|
0
|
573
|
POST
|
I get the same behavior in an incognito window, but now I wonder if I am simply misunderstanding what this option is supposed to do. I was hoping it would remove these options from the login screen: https://www.screencast.com/t/z3GBOii1 This is the code: var info: __esri.OAuthInfo = new this.OAuthInfo();
... View more
04-25-2017
01:40 PM
|
0
|
2
|
573
|
POST
|
The ArcGIS javacript api implies that social logins can be disabled (and by default are disabled). OAuthInfo | API Reference | ArcGIS API for JavaScript 4.3 However, the property does not seem to change anything. The "Google" and "Facebook" options are always available on the https://www.arcgis.com/sharing/oauth2/authorize popup. Can these be disabled?
... View more
04-25-2017
12:20 PM
|
0
|
5
|
1144
|
POST
|
Thank you! That got me to the solution. The function had to look like this to work: private GetTestQuery(where: string) {
return this.esriLoader.require(["esri/tasks/support/Query", "esri/geometry/SpatialReference"]).then(
function (results) {
var Query = results[0];
var SpatialReference = results[1];
var query: __esri.Query = new Query();
query.outFields = ["*"];
query.returnGeometry = true;
query.where = where;
query.outSpatialReference = new SpatialReference(4326);
return query;
});
} Which is a bit awkward, but I understand why it has to be that way. I would rather load the esri libraries and inject into the service in the service constructor, but I know there are two different loading mechanisms going on here. It makes me want to consider the exclude and require pattern you have outlined in your blog, although we don't presently use webpack for the rest of the application. Thank you very much for taking the time to look at this.
... View more
03-16-2017
05:14 AM
|
2
|
0
|
618
|
POST
|
I believe I am missing a subtlety in promise chaining when working with the Angularjs esri loader. Take this example. It is an angular (1.x) service class. Note the console.assert on line 17. I was expecting the GetTestQuery function to return a promise that would resolve to an esri Query object, but this is not what is happening. Can anyone help me understand what I am missing? module Demo.Test {
export class EsriFeatureServiceUtilities {
static $inject = ['esriLoader'];
constructor(private esriLoader: any) {
}
public RunTestQuery(url: string) {
var where = "1 = 1";
return this.QueryTestWithWhere(url, where);
}
private QueryTestWithWhere(url: string, where: string) {
return this.GetTestQuery("1=1").then((query) => {
console.assert(query.where == "1=1", "Why am I not getting a query object back like I expect?");
return this.QueryTestLayer(url, query);
});
}
private QueryTestLayer(url: string, query: __esri.Query) {
return this.esriLoader.require(["esri/tasks/QueryTask"],
function (QueryTask) {
var queryTask = new QueryTask({ url: url });
return queryTask.execute(query);
});
}
private GetTestQuery(where: string) {
return this.esriLoader.require(["esri/tasks/support/Query", "esri/geometry/SpatialReference"],
function (Query, SpatialReference) {
var query: __esri.Query = new Query();
query.outFields = ["*"];
query.returnGeometry = true;
query.where = where;
query.outSpatialReference = new SpatialReference(4326);
return query;
});
}
}
angular.module('Demo.Test').service('EsriFeatureServiceUtilities', EsriFeatureServiceUtilities);
}
... View more
03-14-2017
09:25 AM
|
0
|
3
|
1098
|
POST
|
On the Javascript 4.1 API, I configured a basic popup template for a graphics layer and added multiple graphics to the map. It works great if the user clicks on a single graphic, but if they are zoomed out, the popup will display blank like this What am I missing? Do I have to use a feature layer to be able to handle multiple features on tap?
... View more
12-13-2016
06:04 AM
|
0
|
0
|
741
|
POST
|
Using this sample (or any I have tried): ArcGIS API for JavaScript Sandbox When you use a secure service which causes a prompt, you get this. I assume that there is some css tweaking that could get this looking decent, but is that the best solution? Or is there a better way to handle this that I am missing?
... View more
12-30-2015
04:02 AM
|
0
|
2
|
2418
|
Title | Kudos | Posted |
---|---|---|
2 | 03-16-2017 05:14 AM |
Online Status |
Offline
|
Date Last Visited |
07-16-2021
11:29 AM
|