|
POST
|
I have a layer that I want to be present in my map, but I don't want the user to be able to turn it on or off. I'm using just as a mechanism to allow urlParameters in my Basic Viewer. I can turn it off in the Legend, but it is still in the list of layers.
... View more
05-26-2017
01:55 PM
|
0
|
7
|
7565
|
|
POST
|
That was it! I think I might have tried that one, but I didn't include !important.
... View more
05-26-2017
11:08 AM
|
0
|
0
|
2409
|
|
POST
|
In the Basic Viewer template, I see that I can include custom css to modify the style of various elements. My popup is a little too narrow for its content, and if it was just a bit wider, I hope to avoid a scrollbar from left to right. I've tried to determine what the particular style is to modify, but popups are always tricky because they are so many small elements, nested within one another. I see there is a class esriPopup light esriPopupVisible, but that seems to manage the placement of the entire tag within the map. The next div within it is has the class esriPopupWrapper, then a size, sizer content, then contentPane. I've been able to make the contentPane be larger, but that only takes care of that one part of the tag, not the entire thing. Which element should I be trying to style? Also: How closely do these style names align with the styles in the JavaScript API? I'm much more familiar with it, but our organization is moving toward AGOL, and I need to learn what I may or may not be able to customized in that environment.
... View more
05-26-2017
08:50 AM
|
0
|
4
|
4039
|
|
POST
|
I thought I'd tried that variation, but apparently not. That was it! Thanks.
... View more
03-09-2017
06:21 AM
|
0
|
0
|
2243
|
|
POST
|
This somewhat works: query("#panelSchool").collapse(); query("#collapseSchool").collapse(); However, I allow the either pick from a drop down list of districts, OR if they don't know their district, they can pick first from a list of counties and that looks up the districts available within it. Both call selectSchoolbyDistrict. If I start from the district list, the collapsed panel containing the list of schools within it opens properly. If instead I start from the county list, then pick a district from the short list, the panel does not open. I've tried using query('#panelSchool').collapse({ show: true }) which seems to be supported, but it doesn't do anything. selectSchoolsByDistrict: function(distCode){ var schoolQueryTask = new QueryTask(app.schoolLayer.url);//public schools var schoolQuery = new Query(); schoolQuery.outSpatialReference = app.spatialReference; schoolQuery.returnGeometry = true; schoolQuery.outFields = ['*']; schoolQuery.where = app.schFieldPath+".CtyDist = '" + distCode + "'"; schoolQueryTask.execute(schoolQuery).then(function(results){ if (results) { myGridHandler.updateSchoolGrid(results);//populate the school list zoomDistrict(distCode);//zoom to the school district } }); function zoomDistrict(distCode){ // common.switchDomClass('schoolGridDiv', 'show'); if (domClass.contains('schoolGridDiv', 'div-visible')) { domClass.toggle('schoolGridDiv', 'div-visible'); } // var distCode = registry.byId("distSelect").value; var distQueryTask = new QueryTask(app.districtLayer.url);//school districts distQuery = new Query(); distQuery.returnGeometry = true; distQuery.outFields = ['*']; distQuery.outSpatialReference = app.spatialReference; distQuery.where = "CtyDist = '" + distCode + "'"; distQueryTask.on('error', function(err){ console.log("Error in queryDistrict " + err.Error) }); distQueryTask.execute(distQuery).then(function(results){ if (results.features.length > 0) { var distName = results.features[0].attributes[app.distFieldPath+'.DIST_NAME']; dom.byId('subHeader').innerHTML = 'Missouri Public School Directory - ' + distName; dom.byId('listHeader').innerHTML = "Schools in " + distName + ":"; var distExtent = results.features[0].geometry.getExtent().expand(1.5); app.currentExtent = distExtent; app.map.setExtent(distExtent); } else { dom.byId('subHeader').innerHTML = "Missouri Public School Directory"; } }); console.log ("in zoomDistrict of mySelectHandler"); query("#panelSchool").collapse(); query("#collapseSchool").collapse(); } }
... View more
03-08-2017
01:22 PM
|
0
|
1
|
2243
|
|
POST
|
I did try that. It gives me TypeError: dom.byId(..) collapse is not a function. Because it's a dom object, I guess?
... View more
03-08-2017
09:38 AM
|
0
|
0
|
2243
|
|
POST
|
I have been converting some code to use the calcite map styling, from my previous style of 'everything goes into a side panel'. Originally I had a series of Title Panes, stacked vertically. Now I want each of these to be a collapsible panel, following the example shown on the gitHub site: GitHub - Esri/calcite-maps: A Bootstrap theme for designing, styling and creating modern map apps I'm having a problem understand how I might programmatically open a panel. For example, the user is allowed to search from a dropdown of school districts. This is the panel: <!-- District Search Panel --> <div id="panelDistrictSearch" class="panel collapse in"> <div id="headingDistrictSearch" class="panel-heading" role="tab"> <div class="panel-title"> <a class="panel-toggle" role="button" data-toggle="collapse" href="#collapseDistrictSearch" aria-expanded="true" aria-controls="collapseDistrictSearch"><span class="glyphicon glyphicon-info-search" aria-hidden="true"></span><span class="panel-label">District Search</span></a> <a class="panel-close" role="button" data-toggle="collapse" data-target="#panelDistrictSearch"><span class="esri-icon esri-icon-close" aria-hidden="true"></span></a> </div> </div> <div id="collapseDistrictSearch" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingDistrictSearch"> <div class="panel-body calcite-body-expander"> <div class="panel-body"> <div id="searchDiv"> <h4>Select a District:</h4> <input id='distSelect'> </input> </div> </div> </div> </div> </div> The input is populated from JavaScript based on the values of the district field. Once the user selects a specific district, then the list of schools will be shown. When laid out in the sidebar panel, it was all just stacked. I want the schools to be in their own collapsible panel now. The problem is I'm not sure how to open the school list panel programmatically. The documentation is sparse for this. Collapse - Dojo Bootstrap It tells me I can either enable manually: query(".collapse").collapse() Or query('#myCollapsible').collapse({ toggle: false }) Is this a dojo query? I assume I need to specify which panel I want to open, but so far I haven't got this right. I can manually open the school list panel and see the list is populated, it just doesn't open. Here's the function: function zoomDistrict(distCode){ if (domClass.contains('schoolGridDiv', 'div-visible')) { domClass.toggle('schoolGridDiv', 'div-visible'); } // var distCode = registry.byId("distSelect").value; var distQueryTask = new QueryTask(app.districtLayer.url);//school districts distQuery = new Query(); distQuery.returnGeometry = true; distQuery.outFields = ['*']; distQuery.outSpatialReference = app.spatialReference; distQuery.where = "CtyDist = '" + distCode + "'"; distQueryTask.on('error', function(err){ console.log("Error in queryDistrict " + err.Error) }); distQueryTask.execute(distQuery).then(function(results){ if (results.features.length > 0) { var distName = results.features[0].attributes[app.distFieldPath+'.DIST_NAME']; dom.byId('subHeader').innerHTML = 'Missouri Public School Directory - ' + distName; dom.byId('listHeader').innerHTML = "Schools in " + distName + ":"; var distExtent = results.features[0].geometry.getExtent().expand(1.5); app.currentExtent = distExtent; app.map.setExtent(distExtent); } else { dom.byId('subHeader').innerHTML = "Missouri Public School Directory"; } }); // THIS IS WHERE I'M ATTEMPTING TO OPEN THE PANEL var node = dom.byId("panelSchool"); nl = query(".collapse", node); nl[0].collapse('toggle') ({ toggle: false }); } This is public facing: Missouri School Directory
... View more
03-08-2017
08:08 AM
|
0
|
5
|
3581
|
|
POST
|
I am using the JSAPI, version 3.14, I think. That doesn't seem to make a bit of difference, though. The AGS is version 10.3.1. It was doing the same thing in 10.2.2. I'm not prepared to upgrade any further. We have to maintain our versions across the enterprise. I am not convinced at all it's anything to do with AGS itself and more with a setting/permission we need to open up in our security. It's locked down pretty tight, but the network and cyber security groups are willing to work with us to open it up a bit more, if only we can figure out what to change. I will tell you these are not new applications and all worked until several months ago when then starting implementing new firewall/security settings. We've been fighting it every since, and hoped at least upgrading to 10.3.1 would help. What about the security patches for 10.3.1? Might they help? Our system staff is always leery of stacking change on top of change when they're trying to troubleshoot. All our local services are called via https, but it's hard to control how the ESRI hosted basemaps are called, since they are referenced through the JSAPI basemap gallery widget. The error doesn't seem to be related to mixed content. When the printing fails, this is the sort of message I see in the AGS logs. They all say the call is https. It failed 3-4 times when I first tried to print this AM, then proceeded to work for the next 5 or 6 tries. The behavior is the same in IE or Chrome. We've been looking at SSL, but this is way outside my area of expertise, so I can't tell you what all has been attempted. We see the same sort of problem no matter whether we are using out of the box printing or a custom template. A connection with the server could not be established (WinINet Error while using HTTPS security, 12029), URL = https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json Source: PrintTemplate/ExportWebMap.GPServer
... View more
01-10-2017
02:29 PM
|
0
|
0
|
1017
|
|
POST
|
Has anyone else ever had just intermittent print issues? Using either the out of the box printing or a custom print template, we will randomly have tasks to generate output throw connection errors with the ESRI basemaps. We think it is getting stopped by some security configuration, but the sheer randomness of it has us completely baffled. We contacted ESRI technical support, but weren't able to get very far in the conversation. The fact that it works part of the time, and other times fails makes this extremely hard to troubleshoot. It will fail 4-5 times in a row, then work flawlessly for an hour before deciding to fail again. We have our printing set up to be synchronous, because it doesn't seem like a long enough task to require the setting of asynchronous. I have a sample bit of code that doesn't have any ESRI basemap on it, and I have yet to see it fail. Unfortunately our users expect to see the same map on their printout that they see on the screen.
... View more
01-10-2017
09:33 AM
|
0
|
3
|
2005
|
|
POST
|
I know it is particular about making sure you have the right 64 bit driver. I have no administrative permissions on our SQL Server servers (or any servers for that matter), and therefore can't take you any farther than the tip I gave you. I always look over every compatibility matrix I can find on the ESRI site.
... View more
12-19-2016
10:03 AM
|
0
|
0
|
1643
|
|
POST
|
I have no idea if this will help you or not, but we had a similar error on our servers just a couple of weeks ago. It wasn't a driver problem at all, although the error would lead you to believe that was the source of the error. It turned out that we needed to have a fully qualified domain in our database connection parameters. We had to work with our database administrators (not GIS people) to get our connection parameters set up. It started out as something like sddbsqldxxx\sddsqldxxx (our internal naming convention, so I've blanked out some of it). This was changed to sddbsqldxxx.domain.mo.us\sddsqldxxx domain.mo.us would be your specific fully qualified domain name. Once we changed our definition to include it, we were able to register the data source just fine.
... View more
12-15-2016
02:47 PM
|
1
|
2
|
1643
|
|
POST
|
In the end I separated the creation and populating of the filtering select, so I only created it one time, and after that just populated it. // search for school by name, used to identify district on(dom.byId("txtSchool"), "keydown", function(evt){ if (!app.mySelect) { //creates a new empty filteringselect, assuming 1st time usage of this option mySchoolSelect.initSelect(); } switch (evt.keyCode){ case keys.ENTER: var tbVal = evt.target.value //searches schoollayer for name containing string, populates filteringselect with only those that match mySchoolSelect.populateSelect(tbVal,app.schoolLayer); break; default: } });
... View more
07-25-2016
07:09 AM
|
2
|
0
|
1774
|
|
POST
|
I would like to use the calcite bootstrap maps, since it seems like it manages our responsive design requirements through the examples posted at gitHub. In addition to tools accessed by a menu to open a panel, I'm also in need of a footer, because I need the space to display a grid. I'm using a navbar for this, which maybe is a bad idea, but it does meet the need of 'sticking' to the bottom of my display. This looks fine when I have more of a full screen, up until the point that I resize my browser's width. Then the panel changes position, appearing below the map, above the former footer. That's fine as far as placement, but the row is really short in height, and I don't seem to be able to scroll enough to see all of what's in the panel. I know this is a styling problem, but since I'm using sample code, and I don't yet have a handle on all the calcite css styles, I'm not sure what to change. I'm hoping someone can give me some guidance on this: Radon School Testing Calcite Bootstrap
... View more
07-13-2016
01:04 PM
|
0
|
0
|
1770
|
|
POST
|
I found a 3.x example on the gitHub site for anyone who is attempting this. I had to tinker with the path name to the dojo-bootstrap in order to get it to work, though. calcite-maps/arcgis-3.x.html at master · Esri/calcite-maps · GitHub
... View more
07-07-2016
02:08 PM
|
1
|
0
|
917
|
|
POST
|
I really like the look of the calcite/bootstrap examples. I'm not quite ready to use JSAPI 4.0 though, so I'm working with the samples and hoping they also work with 3.17. It starts out fine, until I want to close the panel that is opened with a select one of my menu choices. When I click the X to close it, I'm getting an error in Collapse.js "Uncaught TypeError: Cannot read property 'call' of undefined. I'm hoping I can get this to work, and that it's not an impossible combination I've created of CSS etc. <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<title>P & P map - Calcite Bootstrap</title>
<!-- Calcite Bootstrap -->
<link rel="stylesheet" href="https://esri.github.io/calcite-maps/dist/css/calcite-bootstrap.min-v0.2.css">
<!-- Calcite Maps -->
<link rel="stylesheet" href="https://esri.github.io/calcite-maps/dist/css/calcite-maps-arcgis-4.x.min-v0.2.css">
<!-- ArcGIS JS -->
<link rel="stylesheet" href="https://js.arcgis.com/3.17/esri/themes/calcite/dijit/calcite.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.17/esri/themes/calcite/esri/esri.css">
<link type="text/css" rel="stylesheet" href="css/style.css">
<script type="text/javascript">
var pathRX = new RegExp(/\/[^\/]+$/)
, locationPath = location.pathname.replace(pathRX, '/');
var dojoConfig = {
parseOnLoad: false,
async:true,
packages: [
{
name: "bootstrap",
location: "https://esri.github.io/calcite-maps/dist/vendor/dojo-bootstrap"
}, {
name: "calcite-maps",
location: "https://esri.github.io/calcite-maps/dist/js/dojo"
}, { name: 'js',
location: locationPath + 'js'
} ]
};
</script>
<script type="text/javascript" src="//js.arcgis.com/3.17compact/"></script>
<script type=text/javascript>
var pathName = "https://ogitest.oa.mo.gov";
var loading;
require([
"dojo/parser",
"dojo/on",
"dojo/dom",
"dojo/dom-construct",
"esri/domUtils",
"esri/map",
"esri/dijit/Popup",
"esri/dijit/Search",
"esri/dijit/BasemapGallery",
"esri/dijit/HomeButton",
"esri/dijit/Legend",
"esri/SpatialReference",
"esri/geometry/Extent",
"js/mySymbol",
"js/myLayers",
"js/mySearch",
// Bootstrap
"bootstrap/Collapse",
"bootstrap/Dropdown",
"bootstrap/Tab",
"bootstrap/Support",
// Calcite Maps
"calcite-maps/calcitemaps-v0.2",
"dojo/domReady!"
], function( parser, on, dom, domConstruct, domUtils,Map,
Popup,Search,BasemapGallery, HomeButton,Legend,SpatialReference,Extent,
mySymbols, myLayers, mySearch
) {
parser.parse();
window.app = {};
loading = dom.byId("loadingImg"); //loading image. id
app.spatialReference = new SpatialReference({wkid: 102100 });
app.startExtent = new Extent(-10583000, 4287025, -9979000, 4980462, app.spatialReference);
var popup = new Popup({
markerSymbol: mySymbols.highlightSymbol(),
fillSymbol: mySymbols.highlightFillSymbol()},
domConstruct.create("div"));
app.map = new Map("mapDiv" ,{
basemap: "streets",
extent: app.startExtent,
infoWindow: popup,
fitExtent:true
});
on(app.map,'update-start',showLoading);
on(app.map, 'update-end', hideLoading);
on(app.map, 'load', function (){
var layers = myLayers.defineServices();
app.map.addLayers(layers);
//Search widget
mySearch.defineSearch(app.map);
//Basemapgallery widget
var basemapGallery = new BasemapGallery({
showArcGISBasemaps: true,
map: app.map
}, "basemapGalleryDiv");
basemapGallery.startup();
// homeButton widget
var homeButton = new HomeButton({
map: app.map,
extent: null
}, "HomeButton");
homeButton.startup();
//legend widget
var legend = new Legend({
map: app.map,
layerInfos: [
{layer: app.officeLayer,
title: "P & P Office"
} , {
layer: app.prisonLayer,
title: "Correctional Facility"
}]
}, "legendDiv");
legend.startup();
}); //end map load
//functions for managing the status icon
function showLoading() {
domUtils.show(loading);
app.map.disableMapNavigation();
app.map.hideZoomSlider();
}
function hideLoading(error) {
domUtils.hide(loading);
app.map.enableMapNavigation();
app.map.showZoomSlider();
}
});
</script>
</head>
<body class="calcite calcite-zoom-left calcite-nav-top calcite-layout-medium-title">
<!-- Navbar -->
<nav class="navbar calcite-navbar calcite-bg-dark calcite-text-light navbar-fixed-top" style="background-color: #7CB1C2;">
<!-- Menu -->
<div class="dropdown calcite-dropdown calcite-text-dark calcite-bg-light" role="presentation">
<a class="dropdown-toggle" role="button" aria-haspopup="true" aria-expanded="false">
<div class="calcite-dropdown-toggle">
<span class="sr-only">Toggle dropdown menu</span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</a>
<ul class="dropdown-menu">
<li>
<a role="button" data-target="#panelBasemaps" aria-haspopup="true"><span class="glyphicon glyphicon-th-large"></span>Basemaps</a>
</li>
<li>
<a role="button" data-target="#panelLegend" aria-haspopup="true"><span class="glyphicon glyphicon-th-large"></span> Legend</a>
</li>
</ul>
</div>
<!-- Title -->
<div class="calcite-title calcite-overflow-hidden">
<span class="calcite-title-main">Probation and Parole Offices</span>
<span class="calcite-title-divider hidden-xs"></span>
<span class="calcite-title-sub hidden-xs">Missouri Department of Corrections</span>
</div>
<!-- Nav -->
<ul class="nav navbar-nav calcite-nav">
<li>
<div class="calcite-navbar-search calcite-search-expander">
<div id="searchDiv"></div>
</div>
</li>
</ul>
</nav>
<!-- Map -->
<div class="calcite-map calcite-map-absolute">
<div id="mapDiv">
<div id="HomeButton" ></div>
</div>
</div>
<!-- Panel Group -->
<div class="calcite-panels calcite-panels-right calcite-text-dark calcite-bg-light panel-group">
<!-- Basemaps Panel -->
<div id="panelBasemaps" class="panel collapse">
<div id="headingBasemaps" class="panel-heading calcite-bgcolor-light" role="tab">
<div class="panel-title">
<a class="panel-toggle collapsed" role="button" data-toggle="collapse" href="#collapseBasemaps"
aria-expanded="false" aria-controls="collapseBasemaps"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span><span class="panel-label">Basemaps</span></a>
<a class="panel-close" role="button" data-toggle="collapse" data-target="#panelBasemaps"><span class="esri-icon esri-icon-close" aria-hidden="true"></span></a>
</div>
</div>
<div id="collapseBasemaps" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingBasemaps">
<div class="panel-body">
<div id="basemapGalleryDiv"></div>
</div>
</div>
</div>
<!-- Legend Panel -->
<div id="panelLegend" class="panel collapse">
<div id="headingLegend" class="panel-heading calcite-bgcolor-light" role="tab">
<div class="panel-title">
<a class="panel-toggle collapsed" role="button" data-toggle="collapse" href="#collapseLegend"
aria-expanded="false" aria-controls="collapseLegend"><span class="glyphicon glyphicon-th-large" aria-hidden="true"></span><span class="panel-label">Legend</span></a>
<a class="panel-close" role="button" data-toggle="collapse" data-target="#panelLegend"><span class="esri-icon esri-icon-close" aria-hidden="true"></span></a>
</div>
</div>
<div id="collapseLegend" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingLegend">
<div class="panel-body">
<div id="legendDiv"></div>
</div>
</div>
</div>
</div>
<!-- end panels -->
</body>
</html>
... View more
07-06-2016
01:23 PM
|
1
|
1
|
3575
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-02-2017 02:38 PM | |
| 2 | 03-18-2022 10:14 AM | |
| 2 | 02-18-2016 06:28 AM | |
| 1 | 03-18-2024 07:29 AM | |
| 4 | 08-02-2023 06:08 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-25-2025
01:56 PM
|