POST
|
The basemap gallery issue has been fixed in v4.9 API.
... View more
11-08-2018
08:54 AM
|
1
|
0
|
1061
|
POST
|
This issue has been fixed in latest v4.9 API. Thanks.
... View more
09-28-2018
08:01 AM
|
0
|
0
|
769
|
POST
|
Hi Rene, Thanks for your quick reply. Below are the browsers in which I saw the issue: Chrome v67.0.8896.99 64-bit Chrome v66.0.3359.170 64-bit Microsoft Edge v42.17134.1.0 Firefox v61.0.1 Firefox v60.0.2 All the browsers mentioned above are in Windows 10 v1803 x64. Let me know if you need additional info. Thanks.
... View more
07-11-2018
07:50 AM
|
0
|
0
|
962
|
POST
|
I'm updating my app to use latest v4.8 JSAPI, while I found a potential bug of the API. In my application, user can switch different webmaps without refresh the page. However, after switching the webmap once, the popup window of the webmap become empty. This issue does not exist in v4.7 API. The issue only happens after changing "map" of a "view". //change map
view.map = new WebMap({
portalItem: {
id: "f2e9b762544945f390ca4ac3671cfa72"
}
}); If I create the view with WebMap in constructor, everything works fine. See the code below. //do not change map
view = new MapView({
container: "viewDiv"
map: new WebMap({
portalItem: {
id: "f2e9b762544945f390ca4ac3671cfa72"
}
}),
}); Here is a running example: https://codepen.io/anon/pen/RBwqjz Steps to repeat the issue with this example: Wait for the page fully loaded Click "Switch Map" button Wait for the new Web Map fully loaded Click any graphics of the Web Map The first popup should look fine Close the popup Click any graphics, then the popup will be all empty
... View more
07-10-2018
12:32 PM
|
0
|
3
|
1148
|
POST
|
I'm using BaseMap Gallery Widget with local basemap source. After I switch to latest v4.8 JSAPI, there is an error message in the console. The gallery looks fine and everything is working, but the error message is very strange and doesn't make a lot of sense. The message says "Could not fetch basemaps from portal." Below is my source code. I only use an array of local base maps as the source, which has been already loaded in browser memory. Why the API is trying to fetch more basemaps from portal? I provided the basemap source in widget gallery constructor, so the widget should just use my local source, not create a new portal source. Maybe there is an issue in widget constructor or in basemap source autocast? By the way, the console error is not seen in v4.7 API, but I can see an HTTP request is sent to fetch portal basemaps. var basemapGallery = new BasemapGallery({
view: view,
source: [
Basemap.fromId("streets-navigation-vector"),
Basemap.fromId("satellite"),
Basemap.fromId("hybrid")
]
}); Here is a running example: https://codepen.io/anon/pen/qKeBWw
... View more
07-06-2018
03:48 PM
|
0
|
3
|
1658
|
POST
|
I'm trying to add Legend into LayerList widget, using the same method as this example. When I test this with a multi-layer webmap, there are some unwanted "legend" text shown in the LayerList. See the screenshot below. These unwanted "legend" texts only exist in v4.8 API. v4.7 is working perfectly as expected. Also, if I clicked the toggle button to hide and show legend panel, those texts will be gone. This behavior is seen in both latest Chrome and MS Edge browsers. The source code is very simple: // Add a legend instance to the panel of a
// ListItem in a LayerList instance
const layerList = new LayerList({
view: view,
listItemCreatedFunction: function (event) {
const item = event.item;
item.panel = {
content: "legend",
open: true
};
}
}); Below is a running example: https://codepen.io/anon/pen/RJzzep
... View more
07-06-2018
12:54 PM
|
0
|
3
|
1162
|
POST
|
It seems that the empty image issue has been fixed in JSAPI v4.8 release. You don't need to workaround it using Arcade expression anymore. Thanks.
... View more
07-05-2018
12:25 PM
|
0
|
0
|
782
|
POST
|
I figured out a work around by using JavaScript in the linkURL of mediaInfo. The code is not pretty, but it works in the latest v4.7 API. If anyone has a better alternative, please let me know. Thanks. {
"popupInfo": {
"title": "{Name}",
"fieldInfos": [...],
"mediaInfos": [{
"title": "Image",
"type": "image",
"value": {
"sourceURL": "{Thumbnail}",
"linkURL": "javascript:window.open('{Image}','_blank')"
}
}]
}
}
... View more
04-20-2018
11:01 AM
|
1
|
0
|
997
|
POST
|
Hi Raluca, It's not mandatory for us to use queryExtent on layer view. To my understanding, query on layer will run on server-side, while query on layer view will run on browser-side. Since all the graphics I need are already shown in browser, I just thought query on layer view may have better performance than query on layer. Thanks. Best, Qi Zhao
... View more
04-20-2018
09:31 AM
|
0
|
1
|
4068
|
POST
|
Hi Matt, Thank you for confirming this issue. Yes, I was able to work around it with Arcade expression. When the image url is empty, I just use a placeholder image instead. The bubble will look like below. It looks better than the empty image but not as good as fully hide the image area. Here is the Arcade expression: {
"popupInfo": {
"title": "{Name}",
"fieldInfos": [...],
"expressionInfos": [{
"name": "expr0",
"title": "ImageUrl",
"expression": "IIf(IsEmpty($feature.Thumbnail),'http://hazegazer.org/assets/image/img_not_available.png',$feature.Thumbnail)",
"returnType": "string"
}],
"mediaInfos": [{
"title": "Image",
"type": "image",
"value": {
"sourceURL": "{expression/expr0}",
"linkURL": "{Image}"
}
}]
}
}
... View more
04-20-2018
09:14 AM
|
0
|
1
|
782
|
POST
|
I noticed a change in popup behavior when I upgraded ArcGIS API from v4.6 to v4.7. I have a layer with images in popup template. Some features in that layer may not have an image, i.e. {Image} field empty. In JSAPI v4.6, the popup will not show image when empty, as expected: However, in JSAPI v4.7, the popup will show an empty image, which looks very weird: Here is an running example: https://codepen.io/anon/pen/YLzoZP I'm wondering if this change is made on purpose or it's a bug in v4.7 API? Thanks.
... View more
04-19-2018
11:09 AM
|
0
|
3
|
908
|
POST
|
I'm making a map with images shown in popup. Because the popup is relatively small in size, I only show thumbnail of the image in popup. When user click the image, I'd like to show a full-resolution image. The popup looks like below: Here is the popup template: {
"popupInfo": {
"title": "{Name}",
"fieldInfos": [...],
"mediaInfos": [{
"title": "Image",
"type": "image",
"value": {
"sourceURL": "{Thumbnail}",
"linkURL": "{Image}"
}
}]
}
} By using "linkURL", I can put a link on the image inside popup. Is there a way to open the link in new window/new tab by default? Currently the link will be opened in place, which means that the map page will be redirected and user will not be able to access map page unless he/she click "Back" button in browser. Here is an running example: https://codepen.io/anon/pen/YLzoZP Maybe in the future we can add a new flag in "mediaInfos" json to tell popup opening the link in new window or not? Maybe we can make all links open in new window by default? Thanks.
... View more
04-18-2018
04:52 PM
|
0
|
2
|
1431
|
POST
|
Hi Raluca, Thank you for looking into this. I'm glad to know that this issue is confirmed and will be fixed in the future. We are trying to change the map view to the extent of feature layer graphics that are shown. Using this page as an example: every time when user select a different "Well Type", a query is performed, and only a subset of features will be shown as query result. We want the map view automatically "go to" the result features. We've implemented a workaround queryExtent function: function queryExtent(lyrView) {
var deferred = new Deferred();
lyrView.queryExtent().then(function(result) {
//queryExtent works well for polyline and polygon layers
deferred.resolve(result);
}).catch(function() {
//queryExtent doesn't work for point layers
return lyrView.queryFeatures();
}).then(function(feature) {
//calculate extent by ourselves
var result = { count: 0, extent: null };
if (!feature || !feature.length)
return deferred.resolve(result);
//all features are points
var xMin = features[0].geometry.x,
xMax = xMin,
yMin = features[0].geometry.y,
yMax = yMin;
for (var feature of features) {
var x = feature.geometry.x,
y = feature.geometry.y;
if (x < xMin) xMin = x;
if (x > xMax) xMax = x;
if (y < yMin) yMin = y;
if (y > yMax) yMax = y;
}
require(['esri/geometry/Extent'], function(Extent) {
result.count = features.length;
result.extent = new Extent({
xMin: xMin,
xMax: xMax,
yMin: yMin,
yMax: yMax,
spatialReference:
features[0].geometry.spatialReference
});
deferred.resolve(result);
};
});
return deferred;
} This function returns the same type of promise with lyrView.queryExtent function: Returns: Type Description Promise<Object> When resolved, returns the extent and count of the features that satisfy the input query. See the object specification table below for details. Property Type Description count Number The number of features that satisfy the input query. extent Extent The extent of the features that satisfy the query.
... View more
04-18-2018
03:12 PM
|
0
|
3
|
4068
|
POST
|
I'm trying to queryExtent with a layer view. Instead of getting the extent, I got a strange exception: The code is very simple: function executeQuery(lyrView) { console.log("Querying extent begin"); lyrView.queryExtent() .then(function(result){ console.log(result); }) .catch(function(e){ console.error(e); }); console.log("Querying extent end"); } Here is an running example: FeatureLayer LayerView QueryExtent It seems that this issue only happenes on point-based feature layers. lyrView.queryExtent works as expected on polygon feature layers. Maybe it's a bug?
... View more
04-05-2018
03:08 PM
|
1
|
5
|
5044
|
Title | Kudos | Posted |
---|---|---|
1 | 11-08-2018 08:54 AM | |
1 | 04-20-2018 11:01 AM | |
1 | 04-05-2018 03:08 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|