POST
|
I am learning how to use the ESRI Calcite Mapstheme. Some maps have panels that are already active when loading the page, like this one has the Settings panel. This is the ESRI Calcite Maps sample code on GitHub: JS Bin Can someone tell me how to make one of the panels active on page load, for example the Info panel? Thank you, Michelle
... View more
08-06-2017
08:28 AM
|
0
|
2
|
1288
|
POST
|
Hi Robert, I added the code after measurement and it doesn't seem to have an effect: var measurement = new Measurement({
map: window.map,
}, dojo.byId('measurementDiv'));
measurement.startup();
aspect.after(measurement, 'setTool', function() {
if (measurement.activeTool) {
map.setInfoWindowOnClick(false);
} else {
map.setInfoWindowOnClick(true);
}
}); Thank you, Michelle
... View more
06-06-2017
10:41 AM
|
0
|
4
|
989
|
POST
|
Hi Robert, I am using the code lines for disabling the chart panel when using the measurement widget: on(measurement, "tool-change", function(evt){
if(!evt.toolName){
map.setInfoWindowOnClick(true);
} else {
map.setInfoWindowOnClick(false);
}
}); but they don't seem to be working anymore. The panel chart appears when you click the measurement tools on the feature layers: Am I using incorrectly the code lines above? Thank you, Michelle arcgisUtils.createMap("25bc5a52ccd746c89daefa179cae0036", "mapViewDiv", {
usePopupManager: true
}).then(function (response) {
window.map = response.map;
window.map.infoWindow.set("popupWindow", false);
initializeSidebar(window.map);
var statesLayer = new FeatureLayer("https://services7.arcgis.com/6FZUQ16zBFwjeNsQ/arcgis/rest/services/Feat_Lay_WFL/FeatureServer/0", {
outFields: ["*"]
});
statesLayer.on("click", generatePopup);
window.map.addLayer(statesLayer);
function generatePopup(evt) {
require(["app/CreateChart"], function (CreateChart) {
if (!CreateChart) {
console.log("Module not loaded");
return;
}
var chart = new CreateChart({
graphic: evt.graphic
});
var chartContent = chart.createPieChart();
window.map.infoWindow.setFeatures([evt.graphic]);
if (!domClass.contains(query("#panelPopup")[0], "in")) {
query("#panelPopup").collapse("toggle");
}
registry.byId("chartPanel").set("content", chartContent);
});
}
var measurement = new Measurement({
map: window.map,
}, dojo.byId('measurementDiv'));
measurement.startup();
// ------------ disable chart when using Measurement Widget -----------------------------------
on(measurement, "tool-change", function(evt){
if(!evt.toolName){
map.setInfoWindowOnClick(true);
} else {
map.setInfoWindowOnClick(false);
}
});
// --------------------------------------------------------------------------------------------
},
function(error) {
console.log("Map creation failed: ", dojo.toJson(error));
}
);
function initializeSidebar(map) {
var lp = new ContentPane({
style: "height:235"
}, dom.byId("chartPanel"));
lp.startup();
}
}
... View more
05-28-2017
12:47 AM
|
0
|
6
|
2176
|
POST
|
Actually I tried adding them before writing to you Here are the lines I added in CreateChart.js : // ---- NEW --------- //
"dijit/layout/TabContainer",
"dijit/layout/ContentPane",
// ------------------ //
createPieChart: function () {
// ---- NEW --------- //
var tc = new TabContainer({},
domConstruct.create("div")
);
var cp1 = new ContentPane;
tc.addChild(cp1);
// ------------------ //
var hea1_ha = this.graphic.attributes.HeaHa1;
var hea2_ha = this.graphic.attributes.HeaHa2;
var hea3_ha = this.graphic.attributes.HeaHa3;
var c1 = domConstruct.create("div", {}, "chartPanel");
var chart1 = new Chart2D(c1);
domClass.add(c1, "chart");
chart1.addPlot("default", {
type: "Pie"
});
chart1.addSeries("", [hea1_ha, hea2_ha, hea3_ha]);
chart1.render();
return chart1;
// ---- NEW --------- //
cp1.set("content", chart1.node);
return tc.domNode
// ------------------ //
} But the Tab Container and Content Pane are not created. Michelle
... View more
05-24-2017
04:19 AM
|
0
|
1
|
1893
|
POST
|
Hi Kelly, A few code lines might be missing in the attachment above. I can not identify the ones referring to the TabContainer and ContentPanes. I would like to use them as in the Info window with chartESRI tutorial and place charts in each cp: Thank you so much, Michelle
... View more
05-23-2017
03:17 AM
|
0
|
3
|
1893
|
POST
|
Hi Kelly, Thank you I followed all your code lines and reproduced the behaviour for a simple web app. While it loaded my main.js it did not load the CreateChart.js. Are there any specifics that make a difference from one web app to another? Thank you, Michelle
... View more
05-22-2017
03:15 AM
|
0
|
5
|
1894
|
POST
|
Hi Kelly, My projects require dojox charts, types stacked areas, stacked columns and others. I would like to extract from the script this part that creates the charts and move it in another .js file. So it loads only if required by the user, not necessarily when loading the map. Couldn't find such a tutorial, sample code on ArcGIS API for JavaScript. So I would like to use this Info window with chart tutorial to understand how this works. Thank you, Michelle
... View more
05-19-2017
11:58 AM
|
0
|
7
|
1894
|
POST
|
I am using this Info window with chart ESRI tutorial. In a scenario where you have a lot of charts and the script becomes larger. Is it possible to extract from the script the part that creates the charts and move it in another .js file? So this file loads only if required by the user, not necessarily when loading the map? Thank you, Michelle
... View more
05-18-2017
01:57 PM
|
0
|
9
|
2608
|
POST
|
I tested it both on Internet Explorer 9 and 11. Here is the JSBin.
... View more
05-17-2017
01:17 PM
|
0
|
2
|
2631
|
POST
|
Hi Kelly Hutchins The css works on all browsers except Internet Explorer. When inspecting the code lines with the Developer Tool, the lines are there. But for whatever reason they just don't have any effect. Is there anything I could do to make the ESRI tutorial work on Internet Explorer? Thank you, Michelle
... View more
05-17-2017
04:01 AM
|
0
|
4
|
2631
|
POST
|
Robert, I got it working http://test.sensomarket.com/
... View more
05-15-2017
11:29 AM
|
0
|
0
|
2959
|
Title | Kudos | Posted |
---|---|---|
1 | 04-19-2017 02:58 PM | |
2 | 03-26-2017 12:28 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|