POST
|
Jeff, Thanks a lot for the long example. I hope you had that code already on hand... This is much appreciated. I definitely like the idea of the basemaps group defined in AGOL or Portal. And if we were to build custom apps, that would definitely be the way I would go. Unfortunately, we are an ISV and based on the number of combinations possible to build a basemap gallery, we had to settle on a compromise. Just like we did 3 years ago when we built v1 of this app, we built our own gallery. It was not complicated and in the end gave us all the functionality we wanted. When the use of Portal and AGOL becomes more widely spread with our customers, we will likely go down the basemaps group path. Just too much legacy customers at this point. Regards, Eric.
... View more
07-27-2015
07:47 PM
|
0
|
0
|
383
|
POST
|
Thejus, Thanks for the reply. This was looking promising. Unfortunately, with this technique, Bing maps do not appear to be supported. I tried setting the type property on the layer and it does not take it. It works great for OpenStreetMap, but no luck for Bing require(['dojo/ready',
'esri/basemaps',
'esri/map'
], function(ready, basemaps, Map) {
ready(function() {
var custom = {
title: "Eric Map",
thumbnailUrl: "http://js.arcgis.com/3.14/esri/images/basemap/streets.jpg",
baseMapLayers: [{
type: 'OpenStreetMap'
// type: 'BingMapsAerial' does not work
}]
};
basemaps.custom = custom;
// map
var map = new Map('map', {
basemap: 'custom'
});
});
}); I assume the type value is the same used by the Basemap. Regards, Eric.
... View more
07-27-2015
07:39 PM
|
0
|
1
|
2009
|
POST
|
thejus, I am not sure I understand your suggestion(s). Let me see if I can clarify: We are an ISV, so our customers want a fair bit of flexibility in specifying their list of basemaps. Because we are an Esri partner, we are frequently pushed to make use of the ArcGIS Basemaps (from ArcGIS.com) even though most of our real customers don't use them. It apparently looks good when we demo and Esri personnel is in the room. That being said, we allow them to use the showArcGISBasemaps option. When they do that, I can't see a way to control order or anything. It always loads the first one in the list (Imagery right now I think). It does that as soon as the gallery is built. I am not sure what you are referring to as "save your custom as json string". I know how to build my own list of basemaps (at least I think I do). I use the Basemap and BasemapLayer with the proper set of id, type, etc., build an array and pass that to the constructor. However, I have the same problem with that: as soon as I provide the list to the gallery (as the constructor parameter), it will automatically select the first one and apply to the map. After which, I have to wait "a little bit" and I can then call select(id) on the gallery. Thanks for helping and please let me know I misunderstood anything.
... View more
07-24-2015
03:03 PM
|
0
|
5
|
2009
|
POST
|
Chris, yeah that was the route we were heading down too. We are primarily an AngularJS app and were going to use their animations and all to do what you suggest: wait for us to know the map is ready for interaction, hide it until then. There are other implications though of setting a "random" basemap first and then select the one you want. in particular, I believe our customers have reported issues with LODs not updating as you switch basemaps.
... View more
07-24-2015
02:51 PM
|
0
|
0
|
2009
|
POST
|
Here is our situation: users can have a custom list of basemaps we use the BasemapGallery to allow them to select their basemap we persist the basemap id in a cookie to load that same basemap the next time they visit their app At this point what is the official way to load the Basemap gallery against a map with a specific basemap selected? The only 2 lines of code involved in setting up the gallery with the map are: var gallery = new BasemapGallery( options );
gallery.startup(); As far as we can tell, there is nothing in the options that allows this. We don't see a selected property on the Basemap. So far, our only option is to let it load the gallery, using the first basemap, then, as soon as it's loaded, call select(id) on the gallery. But as you can guess, the experience is horrible at best. The map loads first with a basemap and within a second or two switches to the one the user really wanted.
... View more
07-24-2015
10:19 AM
|
0
|
12
|
6707
|
POST
|
Robert, Thanks for the info. FWIW, we actually consider the Esri JSAPI 3rd party... our app is primarily an AngularJS app hitting our services. So, we already use AngularJS' $http and $resource for all our calls. I was just wondering if esriRequest did anything more that would make it a clear winner to call Esri services. We'll use it for our couple of Esri calls for now. Thanks for your help, Eric.
... View more
05-11-2015
02:49 PM
|
0
|
1
|
675
|
POST
|
Robert, Thanks for the info. What does the esriRequest have over other standard REST providers (like jQuery or angularjs)? Is it specific to calling ArcGIS server endpoints? does it handle ArcGIS's responses (which are always 200 but may contain an error code)? Regards
... View more
05-11-2015
09:47 AM
|
0
|
3
|
675
|
POST
|
We need to query for single features within our JS application (like when a customer wants to see details about a particular feature). We would like to use the following URL on our ArcGIS server: https://<server>/arcgis/rest/services/<service>/MapServer/<layer>/<objectid> Esri usually provides wrapper for most of those APIs to handle authentication, proxy and error handling. Is there a wrapper for the above URL? We have been using QueryTask so far, but it's a lot more verbose than we need (and requires more setup). We simply need the Attributes and Geometry of a single feature.
... View more
05-08-2015
12:28 PM
|
1
|
2
|
3709
|
POST
|
Does Esri provide a JavaScript API to access information at the following URL: https://<server>/arcgis/rest/services/<service>/MapServer/layers We can obviously access it via a fairly plain HTTP call, but it seems that most of the Esri jsapi call handle authentication and error handling already. We would like to avoid rebuilding that if I don't have to. We looked at the documentation for ArcGISDynamicMapServiceLayer as that is what we use for our data layer in the map, but it seems that LayerInfo does not contain a lot of information (it looks more like the straight call to /MapServer) What we are really after for each layer is: Field aliases Subtype field information Domains This information is fully available on the /MapServer/layers call.
... View more
05-08-2015
12:17 PM
|
1
|
5
|
4637
|
POST
|
We ran into an issue recently with an alias on the OBJECTID field of one of our layers. We perform an Identify query (ArcGIS REST API) and parse the results. We had noticed that the attributes keys were field aliases when we first build our app. However it seems to not apply to the OBJECTID field. Here is the response we got for one of our queries: {
"results" : [{
"layerId" : 7,
"layerName" : "SplicePoint",
"displayFieldName" : "SPLICEENCLOSURETYPE",
"value" : "FiberDome",
"attributes" : {
"OBJECTID" : "21",
"ANCILLARYROLE" : "Null",
"ENABLED" : "True",
"EnclosureType" : "FiberDome",
"Owner" : "GlobalNet Description",
"SPLICEENCLOSUREMANUFACTURER" : "Null",
"SPLICEENCLOSUREMODELNUMBER" : "Null",
"InstalledBy" : "Fiber Pros",
"DATEINSTALLED" : "3/3/2009",
"Location" : "Handhole",
"Description" : "EnviroNet Splice",
"GROUNDINGMETHOD" : "Unknown",
"COMMENTS" : "Null",
"SymbolRotation" : "270.463293",
"STRUCTUREOBJECTID" : "307",
"CREATIONUSER" : "Administrator",
"CREATIONDATE" : "8/25/2009",
"LASTUSER" : "Administrator",
"DATEMODIFIED" : "2/10/2010",
"GlobalID" : "{1605FF76-2F4D-43A8-B63D-DE72D70353CA}",
"FIBERPARENT" : "Null",
"THISFIBERCLASSMODELNAME" : "SPLICEPOINT",
"FIBERPARENTCLASSMODELNAME" : "Null",
"FIBERCHILDCLASSMODELNAME" : "Null",
"AerialUnderground" : "Underground",
"POLEOID" : "Null",
"SubtypeCD" : "UG Splice Case",
"Shape" : "Point"
},
"geometryType" : "esriGeometryPoint",
"geometry" : {/*removed for brevity */
}
}
]
} And here is the layer info returned from the same service (see attachments for the complete listing): "fields" : [{
"name" : "OBJECTID",
"type" : "esriFieldTypeOID",
"alias" : "OID",
"domain" : null
}, {
"name" : "ANCILLARYROLE",
"type" : "esriFieldTypeSmallInteger",
"alias" : "ANCILLARYROLE",
"domain" : null
}, {
"name" : "ENABLED",
"type" : "esriFieldTypeSmallInteger",
"alias" : "ENABLED",
"domain" : {
"type" : "codedValue",
"name" : "EnabledDomain",
"codedValues" : [{
"name" : "False",
"code" : 0
}, {
"name" : "True",
"code" : 1
}
]
}
}, {
"name" : "SPLICEENCLOSURETYPE",
"type" : "esriFieldTypeString",
"alias" : "EnclosureType",
"length" : 50,
"domain" : {
"type" : "codedValue",
"name" : "Fiber Splice Hardware Type",
"codedValues" : [{
"name" : "FiberDome",
"code" : "FiberDome"
}, {
"name" : "Splice Case",
"code" : "Splice Case"
}, {
"name" : "Unknown",
"code" : "Unknown"
}
]
}
} As you can see, even though OBJECTID has an alias (OID), it is returned as OBJECTID. However, SPLICEENCLOSURETYPE is returned as EnclosureType (the alias). This seems to be pretty intentional. "fields" : [{ "name" : "OBJECTID", "type" : "esriFieldTypeOID", "alias" : "OID", "domain" : null }, { "name" : "ANCILLARYROLE", "type" : "esriFieldTypeSmallInteger", "alias" : "ANCILLARYROLE", "domain" : null }, { "name" : "ENABLED", "type" : "esriFieldTypeSmallInteger", "alias" : "ENABLED", "domain" : { "type" : "codedValue", "name" : "EnabledDomain", "codedValues" : [{ "name" : "False", "code" : 0 }, { "name" : "True", "code" : 1 } ] } }, { "name" : "SPLICEENCLOSURETYPE", "type" : "esriFieldTypeString", "alias" : "EnclosureType", "length" : 50, "domain" : { "type" : "codedValue", "name" : "Fiber Splice Hardware Type", "codedValues" : [{ "name" : "FiberDome", "code" : "FiberDome" }, { "name" : "Splice Case", "code" : "Splice Case" }, { "name" : "Unknown", "code" : "Unknown" } ] } }Where, in the REST API documentation, can we find confirmation of the behavior? Regards, Eric.
... View more
04-16-2015
08:28 AM
|
0
|
0
|
2786
|
POST
|
Mike, Thanks for the info. I couldn't make it to the Dev Summit this year, but do you know if there are any plans to support such a deployment? We are an ISV (Schneider Electric) and leverage the Esri platform quite heavily. We are building standalone apps using the Runtime SDKs also. We have several applications/services coming in the next few months that will be similar in architecture to what I mentioned here. We can roll our own Esri REST client if that is what works best moving forward. Regards, Eric.
... View more
04-14-2015
08:46 AM
|
0
|
3
|
1367
|
POST
|
With the upcoming release of Visual Studio 2015 (likely by the end of this month, at Microsoft Build Developer Conference | April 29 – May 1, 2015 ), what can we expect for support of the SDK in Visual Studio 2015. (yes, it's related to my other question Can we use the .NET SDK for building an ASP.NET MVC Web Application?) Also, where can we find details about Esri's plans for the new version of the Framework? While we don't have a strong interest in the new Core, support for what is currently called 4.6 is important to us. Regards, Eric.
... View more
04-10-2015
09:40 AM
|
0
|
4
|
4700
|
POST
|
Mike, We visualize maps directly through Esri's JSAPI. For our HTTP calls, we used JSON (REST?). Primarily we were querying AGS layers (features and tables) for our data. In an nutshell, we aggregate a lot of calls. For example, our users want to search across multiple layers. We send a single request to our MVC app and dispatch our queries to the appropriate layers. We also need to query related records (several levels deep). So, our users want to see details of "cable" 123. When they request this from our MVC endpoint, we then fire up queries to fetch the cable details, including its child records and grand-child records. Hope this helps and that it generates some discussions from Esri. Regards, Eric.
... View more
04-10-2015
09:22 AM
|
1
|
0
|
1367
|
POST
|
A couple of years ago, we built a Web Application in ASP.NET (MVC 4) and used straight-up HttpClient for communicating with ArcGIS Server. We are giving that app a serious makeover and wanted to leverage the Runtime SDK for .NET to get rid of a lot of our custom code for communicating with AGS. In particular, we want to leverage utilities like QueryTask and the likes. We just built a sandbox application and on our first request, we get a "Unable to find ArcGISRuntime deployment folder" exception. Before we dig any deeper into this, we just wanted to check that it was even a supported scenario. Thanks for any help. Eric.
... View more
04-10-2015
08:58 AM
|
0
|
8
|
8659
|
POST
|
We are using the Locator task on the JavaScript API (v3.11). According to the documentation for addressToLocations (Locator | API Reference | ArcGIS API for JavaScript ) the countryCode can be specified on the locator itself, as a property (Locator | API Reference | ArcGIS API for JavaScript ). However, it does not seem to be added to the request. So, the following: var locator = new esri.tasks.Locator("//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");
locator.outSpatialReference = localRef;
locator.countryCode = 'AU';
locator.addressToLocations({ address: { 'SingleLine': 'sidney' } }, function(candidates) {/*...*/}) will return Sidney, Australia, as well has dozens of other Sidney. However, if we add the countryCode directly to the addressToLocations parameters, we get the expected result, with only Sidney Australia as follows: var locator = new esri.tasks.Locator("//geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");
locator.outSpatialReference = localRef;
locator.addressToLocations({ address: { 'SingleLine': 'sidney' }, countryCode : 'AU' }, function(candidates) {/*...*/}) The outSpatialReference is used properly. What are we missing? We tried 3.12 and got the same results. I have created a Plunker to show this issue.
... View more
02-19-2015
04:54 PM
|
0
|
0
|
3757
|
Title | Kudos | Posted |
---|---|---|
1 | 04-10-2015 09:22 AM | |
1 | 08-05-2011 07:33 AM | |
1 | 05-08-2015 12:28 PM | |
1 | 05-08-2015 12:17 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|