|
POST
|
Sorry, you caught it while I was working on the code and you got that error. The code now shows no errors but still the issue persists. The issue is not the map. map in the code is just a variable that defines a new webmap. So, the code that shows no errors and it doesn't work is shown below even though it's identical to the codeview. THe code in codeview uses the variable map as well to define the webmap. const map = new WebMap({
portalItem: {
id: "55ebf90799fa4a3fa57562700a68c405"
}
});
const view = new MapView({
map,
container: "viewDiv",
center: [-119.475, 37.737],
zoom: 5
});
const search = new Search({
view: view,
includeDefaultSources: false,
sources: [
{
name: "ArcGIS World Geocoding Service",
placeholder: "example: Nuuk, GRL",
singleLineFieldName: "SingleLine",
apiKey: "AAPK7472adbedaa9448a8fb246f57ee83a447vIlk5Z-RKxy_pGyWaNdDuLrhh2nuOJdHJNMJch4AHAzDM96kvMcD8r1uM0UArb2",
suggestionsEnabled: true,
minSuggestCharacters: 2,
locator:
"https://geocode-api.arcgis.com/arcgis/rest/services/World/GeocodeServer"
}
]
});
... View more
06-16-2022
09:33 AM
|
0
|
1
|
2219
|
|
POST
|
I have two sites with identical codes but on one of them the apikey is not working, and the search widget is failing. I need a fresh pair of eyes. Am I missing anything? Working site: https://codepen.io/lkoumis1/pen/poaYzNG?editors=1000 Not working site: http://svctenvims.dot.ca.gov/test_search/ The script is at: http://svctenvims.dot.ca.gov/test_search/calcite.js
... View more
06-15-2022
01:02 PM
|
0
|
3
|
2269
|
|
POST
|
ok, thanks for the clarification, perhaps should be a note on the popover page that prior to beta.82, popover manager is needed. Not everyone checks the github updates frequently.
... View more
05-27-2022
09:59 AM
|
1
|
1
|
2252
|
|
POST
|
Thank you. It works. However at: https://developers.arcgis.com/calcite-design-system/components/popover/ there should be a note that popover is depreciated.
... View more
05-27-2022
09:30 AM
|
0
|
3
|
2263
|
|
POST
|
THis simple script works in codepen: <calcite-popover label="Example label" reference-element="popover-button">
<p style="padding:0 10px;display:flex;flex-direction:row">
Popover content here
</p>
</calcite-popover>
<calcite-link id="popover-button">Activate Popover</calcite-link> But when I use the same script inside a tab, the popover doesn't appear. <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>Test</title>
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.23/esri/themes/light/main.css" />
<script type="module">
import WebMap from "https://js.arcgis.com/next/@arcgis/core/WebMap.js";
import MapView from "https://js.arcgis.com/next/@arcgis/core/views/MapView.js";
var map = new WebMap({
basemap: "streets-vector",
portalItem: { // autocasts as new PortalItem()
id: "f2e9b762544945f390ca4ac3671cfa72"
}
})
const view = new MapView({
map,
container: "viewDiv",
center: [-122.475, 39.737],
zoom: 5
});
document.querySelector("calcite-shell").hidden = false;
document.querySelector("calcite-loader").active = false;
</script>
</head>
<body translate="no">
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>Test</title>
<script src="https://js.arcgis.com/calcite-components/1.0.0-beta.77/calcite.esm.js" type="module"></script>
<link rel="stylesheet" href="https://js.arcgis.com/calcite-components/1.0.0-beta.77/calcite.css" />
<link rel="stylesheet" href="https://js.arcgis.com/4.22/@arcgis/core/assets/esri/themes/light/main.css" />
</head>
<style>
</style>
<body>
<calcite-shell content-behind hidden>
<calcite-shell-panel slot="primary-panel" detached>
</calcite-shell-panel>
<!-- ShellPanel slot="contextual-panel" -->
<calcite-shell-panel slot="contextual-panel" position="end" detached>
<calcite-block open heading="Test" style="height:1110px">
<calcite-tabs>
<calcite-tab-nav slot="tab-nav" id="thetabs">
<calcite-tab-title id="tab2" class="tab2" tab="Tab1" active>Tab1
</calcite-tab-title>
<calcite-tab tab="Tab1" style="height: 750px;">
<calcite-popover label="Example label" reference-element="popover-button">
<p style="padding:0 10px;display:flex;flex-direction:row">
Popover content here
</p>
</calcite-popover>
<calcite-link id="popover-button">Activate Popover</calcite-link>
</calcite-tab>
</calcite-tabs>
</calcite-block>
</calcite-shell-panel>
<div id="viewDiv"></div>
</calcite-shell>
</body>
</html>
... View more
05-26-2022
06:15 PM
|
0
|
5
|
2316
|
|
POST
|
Thank you. The feature widget page states: "The Feature widget displays a graphic according to its PopupTemplate." Since I don't use popuptemplate, then it wouldn't be applicable to me. All examples use a popuptemplate. Also, a detail I omitted to mention about my app is that the feature layers on the map are not from web map rather REST services. I get the default popup displayed at the feature location without using popuptemplate. I am trying to capture the view.popup.content so I can store it in a div.
... View more
05-25-2022
10:59 AM
|
0
|
0
|
1432
|
|
POST
|
In WAB was able to capture the contents of the popup, customize it and display them in a div. In JS 4, after a clicking a feature, want to know of how to store all the formatted content from a default popup to a variable so they can be assigned to a div. I don't use popuptemplate because I deal with hundreds of layers with different fields. So, in a word the task is upon clicking on a feature, capture the popup contents and prevent the display of the default popup, since I will assign it to a div. The dockoptions not a good option for me.
... View more
05-25-2022
09:35 AM
|
0
|
3
|
1442
|
|
POST
|
Thank you. I found the issue. I was calling an initialization function with view popup.close().
... View more
05-23-2022
07:53 AM
|
0
|
0
|
1331
|
|
POST
|
The graphicTemplate retuns null even though there is a graphic on click. Does the getEffectivePopupTemplate works? view.on("click", function(event) {
view.hitTest(event).then(function(event) {
var graphic = event.results[0].graphic;
console.log(graphic)
if (graphic){
const graphicTemplate = graphic.getEffectivePopupTemplate()
console.log(graphicTemplate)
}
... View more
05-19-2022
04:29 PM
|
0
|
2
|
1404
|
|
POST
|
THe panel on the left is the primary and on the right is the <calcite-shell-panel slot="contextual-panel" position="end" width-scale="l" detached>
... View more
05-06-2022
01:01 PM
|
0
|
1
|
3056
|
|
POST
|
THat's correct. I mentioned in my posting to JS ArcGIS group that the only option I know is to use panel with the dismissible property. So, I was wandering if there is another option before I go that route. I guess the answer is no.
... View more
05-04-2022
02:16 PM
|
0
|
1
|
1486
|
|
POST
|
I posted this question in ArcGIS JS forum and it was suggested to ask it here. https://community.esri.com/t5/arcgis-api-for-javascript-questions/close-button-for-basemap-widget/m-p/1170788#M77221 All ESRI widgets, like layerlist , basemaps, legend... lack a close button. The expand widget is not an option, if you place your widgets in a navigation bar and they are grouped together as it is shown below.
... View more
05-04-2022
01:12 PM
|
1
|
3
|
1499
|
|
POST
|
In web appbuilder, the widgets including the Basemap have the close button. In ArcGIS JS API 4.x there is no property for close button. One option is to use the expand widget which doesn't fit my needs since he basemap icon resides at a horizontal menu. So, the only option is to place the basemap gallery within a panel with the dismissible property? Basemap widget in WAB
... View more
05-04-2022
12:07 PM
|
0
|
1
|
1152
|
|
POST
|
I am using a panel that would like programmatically reverse the status set by using the dismissible and dismissed properties. If use the dismissible property and the x is clicked, wanted to programmatically restore the panel visibility. <calcite-panel dismissible id="X">
<div slot="header-content">Test</div> Tried: document.getElementById("X").style.display = 'block' Also, if the panel is originally hidden <calcite-panel dismissed id="X">
<div slot="header-content">Test</div> Tried document.getElementById("X").style.display = 'block' and document.getElementsByTagName("calcite-panel").dismissed = false
... View more
05-02-2022
02:17 PM
|
0
|
1
|
1008
|
|
POST
|
I understand that Calcite has a library of icons to use, however, they don't have the ones I need. I found some under the meridian library however, their use is limited to Esri Partners and it can be accessed only through the Esri partner community. I would like to use icon only button with an image from a local file. I can use css along with the calcite-button, but I need to remove the outline from the calcite button and make my image to fit inside the button.
... View more
04-29-2022
11:53 AM
|
0
|
1
|
2477
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 3 weeks ago | |
| 1 | 06-19-2025 10:13 PM | |
| 3 | 02-06-2026 10:44 AM | |
| 1 | 01-08-2026 12:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|