POST
|
Hello, I am using the Smart Editor Widget in a v2.1 WAB DE application. I noticed that when I start the Smart Editor widget, any labels that are created for a layer disappear for that layer. Once I turn off the Smart Editor widget, the labels re-appear. Has anyone come across this, and if so, is this a bug, or is it supposed to behave this way? Before SE widget is turned on: While SE widget is active: After SE widget is closed: Thank you! Chris
... View more
06-19-2017
12:57 PM
|
0
|
1
|
874
|
POST
|
Thank you all, It turns out I was loading the modules in the incorrect order. Such a headache over such a simple mistake! haha Chris
... View more
06-16-2017
06:38 AM
|
1
|
2
|
1578
|
POST
|
Hello all, If you utilize the Print Widget while the "GeoLocation" widget is active, the print widget fails immediately. It does add this to the Web_Map_as_JSON property though: {
"id":"map_graphics",
"opacity":1,
"minScale":0,
"maxScale":0,
"featureCollection":{
"layers":[
{
"layerDefinition":{
"name":"pointLayer",
"geometryType":"esriGeometryPoint"
},
"featureSet":{
"geometryType":"esriGeometryPoint",
"features":[
{
"geometry":{
"x":-8918372.693449495,
"y":4923226.038599581,
"spatialReference":{
"wkid":102100
}
},
"attributes":{
"position":{
"coords":{
"latitude":40.393059099999995,
"longitude":-80.115105,
"altitude":null,
"accuracy":6065,
"altitudeAccuracy":null,
"heading":null,
"speed":null
},
"timestamp":1497552113031
}
},
"symbol":{
"angle":0,
"xoffset":0,
"yoffset":0,
"type":"esriPMS",
"url":"https://js.arcgis.com/3.17/esri/dijit/images/sdk_gps_location.png",
"width":21,
"height":21,
"style":"esriSMSSquare"
},
"infoTemplate":{
"title":"Your Current Location:",
"content":"<b>Address: </b>198 Cluxton Rd, Collier Twp, Pennsylvania, 15106<br><b>Latitude: </b> 40.393059<br><b>Longitude: </b> -80.115105"
}
}
]
}
}
]
}
} I do not know if there is anything in here that would cause this to fail. Is this an issue anywhere else? Thank you, Chris
... View more
06-15-2017
11:52 AM
|
0
|
0
|
454
|
POST
|
I have, and it returns a valid Rest URL that I can open in a new tab. I will post more code as soon as I am able to. Thanks! Chris
... View more
06-12-2017
07:05 AM
|
0
|
1
|
1578
|
POST
|
Hello all! I am attempting to add a layer via a URL that the user provides via a text box in the UI. I can capture the layer URL and work with it in JS, but when I attempt to use it to create a layer, I get the following error in the console "Uncaught TypeError: a.hasChildNodes is not a function" Here is the JS code that attempts to use the entered URL to create a new Dynamic Map Service Layer: NOTE: The URL I have been working with is: nowcoast/mapoverlays_political (MapServer) var layerURLbox = registry.byId("LayerURLbox");
on(dom.byId("layerSubmit"), "click", getValue);
function getValue() {
console.log(layerURLbox.get("value"));
layerValue = layerURLbox.get("value")
getLayerType(layerValue);
}
function getLayerType(layerURLValue) {
if (layerURLValue.indexOf("MapServer")) {
console.log("Map Service");
var layer = new ArcGISDynamicMapServiceLayer(layerURLValue, {
id: "Test"
})
map.addLayer(layer);
} The console error I mentioned occurs on line 14, where I attempt to create the new ArcGISDynamicMapServiceLayer. It does not make it to map.addLayer. If anyone has any pointers or has tried this before, please let me know! Thank you! Chris
... View more
06-09-2017
03:37 PM
|
0
|
12
|
3513
|
POST
|
Shaun, We were able to develop our own proxy that resides within our application. It is similar to the Esri proxy. Unfortunately, I am not able to share it at this time, but I can tell you how we made it work with the Print widget. NOTE: These would only work for the DotNet version of the Esri resource proxy. Get the "Web_Map_as_JSON" (WMAJ) parameter (and data it contains) from the the request. Using a library like Newtonsoft.Json, deserialize the WMAJ data from a JSON object into a DotNet Object Get the "Operational Layers" section of the WMAJ object and add each layer into an array. Compare the Layer URL's of the layers from the WMAJ object and the URL's that are defined in the proxy.config file. If a layer's URL matches a URL from the proxy config file, use the credential info to generate a token for it. Apply the token to the layer in the array of "Operational Layers" Serialize the DotNet WMAJ object (now with tokens for the secured layers) and send the request on its way. I include the print task URL in the app's config.json file and the proxy's proxy.config file. I am sorry that I am unable to provide more info at this time, I hope that this helps! Chris
... View more
05-22-2017
02:28 PM
|
4
|
0
|
3907
|
POST
|
Hello, Can Graphics Layers be Queried? I cannot see anywhere that says that they cannot. I know that CSV Layers cannot be queried. Thanks, Chris
... View more
05-03-2017
07:22 AM
|
0
|
5
|
3083
|
POST
|
Hello all, I found this solution for those applications that do not use a proxy. //working around an arcgis server feature service bug. Requests to queryRelatedRecords operation fail with feature service 10.
//Detect if request conatins the queryRelatedRecords operation and then change the source url for that request to the corresponding mapservice
esriRequest.setRequestPreCallback(function(ioArgs) {
if (ioArgs.url.indexOf("queryRelatedRecords") !== -1) {
ioArgs.url = ioArgs.url.replace("FeatureServer", "MapServer");
}
return ioArgs;
}); It intercepts the request like the proxy and changes the URL. This was found on this site: Query and edit related records | ArcGIS API for JavaScript 3.20 Thanks, Chris
... View more
04-11-2017
06:14 AM
|
1
|
0
|
1149
|
POST
|
Hello all, I have been working with WAB 2.1 DE and I wanted to be able to show the address of your location when the Locate Button is clicked. By default there is no popup that is displayed when the symbol that displays your location is clicked. I have made some edits to make this happen. Here is the code. It is the entire "widget.js" file for the "MyLocation" widget. ///////////////////////////////////////////////////////////////////////////
// Copyright © 2014 Esri. All Rights Reserved.
//
// Licensed under the Apache License Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
///////////////////////////////////////////////////////////////////////////
define([
'dojo/_base/declare',
'jimu/BaseWidget',
"esri/dijit/LocateButton",
"esri/InfoTemplate",
"esri/tasks/locator",
"esri/geometry/Point",
'dojo/_base/html',
'dojo/on',
'dojo/_base/lang',
'jimu/utils',
'jimu/dijit/Message',
'dojo/touch'
],
function (
declare, BaseWidget, LocateButton, InfoTemplate, Locator, Point, html, on, lang, jimuUtils) {
var geoLocate;
var clazz = declare([BaseWidget], {
name: 'MyLocation',
baseClass: 'jimu-widget-mylocation',
startup: function () {
this.inherited(arguments);
this.placehoder = html.create('div', {
'class': 'place-holder',
title: this.label
}, this.domNode);
this.isNeedHttpsButNot = jimuUtils.isNeedHttpsButNot();
if (true === this.isNeedHttpsButNot) {
console.log('LocateButton::navigator.geolocation requires a secure origin.');
html.addClass(this.placehoder, "nohttps");
html.setAttr(this.placehoder, 'title', this.nls.httpNotSupportError);
} else if (window.navigator.geolocation) {
this.own(on(this.placehoder, 'click', lang.hitch(this, this.onLocationClick)));
} else {
html.setAttr(this.placehoder, 'title', this.nls.browserError);
}
},
onLocationClick: function () {
if (html.hasClass(this.domNode, "onCenter") ||
html.hasClass(this.domNode, "locating")) {
html.removeClass(this.domNode, "onCenter");
html.removeClass(this.placehoder, "tracking");
this._destroyGeoLocate();
} else {
this._createGeoLocate();
this.geoLocate.locate();
html.addClass(this.placehoder, "locating");
}
},
onLocate: function (parameters) {
html.removeClass(this.placehoder, "locating");
if (this.geoLocate.useTracking) {
html.addClass(this.placehoder, "tracking");
}
if (parameters.error) {
console.error(parameters.error);
// new Message({
// message: this.nls.failureFinding
// });
} else {
html.addClass(this.domNode, "onCenter");
this.neverLocate = false;
}
},
_createGeoLocate: function () {
var json = this.config.locateButton;
json.map = this.map;
if (typeof (this.config.locateButton.useTracking) === "undefined") {
json.useTracking = true;
}
json.centerAt = true;
this.geoLocate = new LocateButton(json);
this.geoLocate.infoTemplate = new InfoTemplate({}),
this.geoLocate.startup();
this.geoLocate.own(on(this.geoLocate, "locate", lang.hitch(this, this.onLocate)));
on(this.geoLocate, "locate", lang.hitch(this, addPoint));
},
_destroyGeoLocate: function () {
if (this.geoLocate) {
this.geoLocate.clear();
this.geoLocate.destroy();
}
this.geoLocate = null;
},
destroy: function () {
this._destroyGeoLocate();
this.inherited(arguments);
}
});
var locator = new Locator("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer");
var address;
function addPoint(evt) {
var latitude = evt.position.coords.latitude;
var longitude = evt.position.coords.longitude;
locator.locationToAddress(new Point(longitude, latitude), 100);
locator.on("location-to-address-complete", lang.hitch(this, function (AddressEvt) {
if (AddressEvt.address.address) {
address = AddressEvt.address.address.Match_addr
}
else
address = "No Address Available."
this.geoLocate.infoTemplate.setTitle("Your Current Location:");
this.geoLocate.infoTemplate.setContent(
"<b>Address: </b>" + address +
"<br><b>Latitude: </b> " + latitude.toFixed(6) + "<br><b>Longitude: </b> " + longitude.toFixed(6)
);
}));
}
clazz.inPanel = false;
clazz.hasUIFile = false;
return clazz;
}); Please let me know if there are suggestions/questions! I will be testing this in the newer versions of WAB. Thank you! Chris
... View more
04-03-2017
06:55 AM
|
0
|
0
|
984
|
POST
|
Lefteris, Here is the entry that I am referencing: No use of Content with a non-Google map. You must not use the Content in a Maps API Implementation that contains a non-Google map. This is Requirement 10.4.e. Link: Google Maps APIs Terms of Service | Google Maps APIs | Google Developers I am not sure how licensing works with this though, I would contact a Google rep just to be sure. Chris
... View more
02-14-2017
08:43 AM
|
1
|
1
|
404
|
POST
|
Is this allowed with Google Maps TOS? I have read before that Google does not allow it's maps to be used in any application that is based off of another mapping API (Like Esri). Thanks, Chris
... View more
02-14-2017
05:54 AM
|
0
|
2
|
404
|
DOC
|
The purpose of this widget is to provide the user with easy access to basic information about the web map that is being used in the WAB app. This widget was created with WAB DE 2.2 and has been tested in 2.16 with no issues. Features of the widget: Get current map Extent Projection Coordinates Geographic Coordinates Get map Spatial Reference Get Web Map Information Title Map ID Owner ArcGIS Online Sharing level Tags Get Map Layer Info A list of the unique layer ID's that are assigned to the layers when they are added to the Web Map. Feature Layers Dynamic MapService Layers If there are any questions/suggestions please let me know! Thank you, Chris
... View more
01-20-2017
01:18 PM
|
4
|
3
|
2980
|
Title | Kudos | Posted |
---|---|---|
1 | 06-10-2016 07:23 AM | |
1 | 05-24-2021 02:27 PM | |
1 | 11-02-2016 02:19 PM | |
1 | 05-18-2016 08:47 AM | |
1 | 01-04-2017 06:06 AM |
Online Status |
Offline
|
Date Last Visited |
06-30-2022
11:30 AM
|