|
POST
|
I suppose I could join to both these tables and author the service that way, but I was hoping for a solution where I didn't have to create all the joins. It makes the field names much more complicated to deal with, and is a performance hit as well.
... View more
05-18-2015
01:30 PM
|
0
|
1
|
1063
|
|
POST
|
I have a data set with columns that include codes for provider type and specialty type. These each have their own corresponding code description table, each containing the code as it appears in the data (10, 20, 30) , and then a column containing the description (hospital, clinic, ambulance). How do I set my infoTemplate up to use the description instead of the code in this scenario? I set the service up to have a relate between the code columns and the description tables, but I'm having a hard time with the syntax. I thought I could use a relationship to pull this information, but then I'm also reading about a relationshipQuery. I have little or no control over the content of any of these tables. I typically use a featureLayer with an infoTemplate. I've looked into popupTemplates as well, but that seems to have an extra level of complexity I don't need. Unless I must use a popupTemplate instead to use the syntax to get to the related table? Here is the service: https://ogitest.oa.mo.gov/arcgis/rest/services/DSS/medProvider/MapServer/0
... View more
05-18-2015
01:09 PM
|
0
|
3
|
3453
|
|
POST
|
All this time I had it in my head that if I was using dojo components I needed to use 'registry.byId'. In the case of my button, it's even more confusing to me, since it's typed as dijit/form/Button.
... View more
05-18-2015
06:33 AM
|
0
|
1
|
2651
|
|
POST
|
This is a very basic script, but I can't figure out why it's not finding my GO button! I've looked it over many times and can't spot anything out of order in terms of my requires. I thought at first there was something wrong with the function I was calling, so I made a 2nd one that's still just empty. I have a very convoluted where clause to execute and I'm attempt to let the user enter the codes, but I can't get past creating the button to execute it! <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Search</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.13/dijit/themes/claro/claro.css"/>
<link rel="stylesheet" type="text/css" href="https://js.arcgis.com/3.13/esri/css/esri.css"/>
<style type = "text/css">
#mapDiv, .map {
height: 500px;
width: 500px;
}
</style>
<script type="text/javascript">
var dojoConfig = {
parseOnLoad: false,
async:true
};
</script>
<script type="text/javascript" src="https://js.arcgis.com/3.13/"></script>
</head>
<body class="claro">
<script type=text/javascript>
var pathName = "https://ogitest.oa.mo.gov";
require(["dojo/parser","esri/map", "esri/layers/FeatureLayer", "esri/layers/ArcGISDynamicMapServiceLayer",
"esri/tasks/query", "dojo/on", "dojo/dom", "dijit/registry", "dijit/form/Button", "dojo/domReady!"
], function(
parser, Map, FeatureLayer, ArcGISDynamicMapServiceLayer, Query,
on, dom, registry, Button){
parser.parse();
var map = new Map("mapDiv", {
center: [-92.593, 38.5],
zoom: 7,
basemap: "topo"
});
var pointLayer = new FeatureLayer(pathName + "/arcgis/rest/services/DSS/medProvider/MapServer/0", {
mode: FeatureLayer.MODE_ONDEMAND,
id: "pointLayer",
outFields: ["*"]
});
var countyLayer = new ArcGISDynamicMapServiceLayer(pathName + "/arcgis/rest/services/BaseMap/county_simple/MapServer", {
id: "countyLayer"
});
pointLayer.on('load', executeSearch);
map.addLayers([countyLayer, pointLayer]);
function executeSearch(){
// console.log('in executeSearch');
// var provCode = dom.byId('txtProvider').value;
// var specCode = dom.byId('txtSpecialty').value;
var query = new Query();
// var whereClause = "Provider_Type IN ('" + sortedString + "')";
// var whereClause = "ID_PROV_TYPE_FK IN ('40','74') AND ID_SPECIALTY_FK IN ('73','74','75','83','84','85')";
var whereClause = "ID_PROV_TYPE_FK IN ('35') AND ID_SPECIALTY_FK IN ('E5')";
// var whereClause = "ID_PROV_TYPE_FK IN ('" + provCode + "') AND ID_SPECIALTY_FK IN ('" + specCode + "')";
// var whereClause = "1=1";
query.where = whereClause;
pointLayer.setDefinitionExpression(whereClause);
var gridQuery = new Query();
pointLayer.selectFeatures(gridQuery, FeatureLayer.SELECTION_NEW, function(results) {
dom.byId('infoDiv').innerHTML = results.length + " features found";
if ( results.length > 0 ) {
var feature = results[0];
} else {
console.log("error in pointLayer selection");
}
});
}
function executeBtnSearch(evt){
console.log('in executBtnSearch');
}
//event listener
registry.byId("btnGo").on("click", executeSearch2);
});
</script>
<div id="mapDiv">
<input id="txtProvider" dojo-data-type="dijit/form/TextBox" placeHolder='Enter Provider Code'>
</input>
<input id="txtSpecialty" dojo-data-type="dijit/form/TextBox" placeHolder='Enter Specialty Code'>
</input>
<button id="btnGo" dojo-data-type="dijit/form/Button"> GO </button>
</div>
<div id="infoDiv">Features </div>
</body>
</html>
... View more
05-15-2015
02:45 PM
|
0
|
10
|
6544
|
|
POST
|
I am attempting to populate a ondemandlist with the results of a querytask. Reading up on ondemandlists, it sounds like another alternative to creating a select dropdown that I can populate from a memory store. I'm not getting errors, but it doesn't look like my List is getting any data in it. Has anyone ever used this? You'll have to stretch this out a bit in jsfiddle. I didn't strip out the bootstrap style I've worked so hard to figure out As I set breakpoints, it looks like the dropdown ends up with data, but it's not reflected in the list. I thought at first I had a styling problems (I have been known to have white text on white background), but it doesn't seem to be displaying the values I think I passed it from Memory. http://jsfiddle.net/schlot/n920n13a/
... View more
05-14-2015
01:53 PM
|
0
|
1
|
3516
|
|
POST
|
I am attempting to make my maps more responsive using bootstrap-map and dojo-bootstrap. I typically use a popup for my infoWindow, defined as var highlightMarkerSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 22,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([255,255,0]), 2),new Color([255,255,0,0.4]));
var popup = new Popup({
markerSymbol: highlightMarkerSymbol},
domConstruct.create("div"));
map = new Map("mapDiv", {
infoWindow: popup,
basemap: "streets",
center: [-92.593, 38.5],
zoom: 7
}); Using bootstrap-map instead as var popup = new Popup({
markerSymbol: highlightMarkerSymbol},
domConstruct.create("div"));
var map = new BootstrapMap("mapDiv", {
infoWindow: popup,
basemap: "streets",
center: [-92.593, 38.5],
zoom: 7
});
}); I'm not getting an error creating a bootstrap map including a popup parameters, but I'm not seeing the typical 'Zoom to' link at the bottom of my infoWindow either. Is this just a styling issue? That was part of the functionality that I liked for using popups. I can see why you might want to have a scaled down infoWindow for a small device, but for a desktop size, it seems like you'd still want to have the full functionality I'm used to seeing. Am I missing something? Where do I find documentation that gives more detail on the difference between map vs. bootstrap-map? I'm not see much on github.
... View more
05-06-2015
06:47 AM
|
1
|
0
|
3707
|
|
POST
|
I managed to unsubscribe myself to all threads when I thought I could opt out individually. I guess I'd better look at that more closely. I just now saw your reply, 3 days later. I could have saved myself some effort, but I guess that's how you learn. I eventually discovered this on my own by looking at your main.js code a little more closely. Since I wasn't doing anything with the modals or the the complaints, I commented out too much, including the query related to the sidebar. Thank you so much for your example. I'm finally on my way to having a decent look responsive design that I can wrap my head around. I find most examples either to be too simplistic (Hello World ...) or too complicated for me to grasp. Bridging that gap for a cartographer who needs to be a programmer isn't easy. Now I'm trying to track down a bootstrap example I saw that included the basemapgallery widget, with a tooltip of the name that appeared as a rollover. Using that widget with the bootstrap styling seems to only give you the thumbnails and no text. I can't remember where I saw it, or even if it was called tip or tooltip. Was that something you've posted? I've looked through as many bootstrap-map examples in the past two weeks that I could lay my hands on, but I didn't get them all bookmarked.
... View more
04-30-2015
02:03 PM
|
1
|
2
|
2630
|
|
POST
|
I am working through Tom Wayson's example of a citizen request map. In it there is an infoTemplate defined in JSON format: infoTemplate: { title: '<b>Request ${objectid}</b>', content: '<span class="infoTemplateContentRowLabel">Date: </span>' + '<span class="infoTemplateContentRowItem">${requestdate:DateFormat}</span><br><span class="infoTemplateContentRowLabel">Phone: </span>' + '<span class="infoTemplateContentRowItem">${phone:formatPhoneNumber}</span><br><span class="infoTemplateContentRowLabel">Name: </span>' + '<span class="infoTemplateContentRowItem">${name}</span><br><span class="infoTemplateContentRowLabel">Severity: </span>' + '<span class="infoTemplateContentRowItem">${severity:severityDomainLookup}</span><br><span class="infoTemplateContentRowLabel">Type: </span>' + '<span class="infoTemplateContentRowItem">${requesttype:requestTypeDomainLookup}</span><br><span class="infoTemplateContentRowLabel">Comments: </span>' + '<span class="infoTemplateContentRowItem">${comment}</span>' } I have an existing function I need for my content. Is there a JSON style format for infoTemplate that will still let me call my function?
... View more
04-29-2015
10:16 AM
|
0
|
0
|
3972
|
|
POST
|
I am attempting to make a very simple bootstrap style of my map. I'm using some of the samples from the bootstrap-map on github. I'd like to be able to have a sidebar on the right when the screen is desktop or tablet size, but collapse it down to a button at the top when there isn't room. When you click the button, I want a panel of what was in the sidebar to be available. I'm having a hard time grasping the concept of the nav-bar and how to use toggle and/or collapse. Maybe the combination I've come up with is nonsensical. Since my current code has dojo TitlePane's, which can be collapsed, I added an accordion to manage the content of the side bar that gives a similar flavor to my current maps. Here's a fiddle of what I'm trying to do. It still contains remnants of the original code I started from (the responsive citizen demo on github). It's styled enough to collapse the sidebar, although that is coming from the column classes and nothing to do with getting it hooked up to a button in the top. http://jsfiddle.net/schlot/o6dsnedc/1/
... View more
04-27-2015
01:57 PM
|
0
|
4
|
5728
|
|
POST
|
Answering my own question - yes. I copied the Collapse.js and Support.js local to my project and they worked fine. There doesn't seem to be any other dependencies.
... View more
04-24-2015
02:12 PM
|
0
|
0
|
1105
|
|
POST
|
My current map has a header, map and sidebar, which contains several DOJO TitlePanes that act as accordions. I like using titlePanes, rather than the actual accordion, because I can pick and choose which ones are open at start up, and you're not limited to one at a time being open. These titlePanes act as dividers, one containing a geocoder, one my basemap widget, one a dGrid etc. While I need to make this design more responsive, I don't really want to depart from my original styling. It seems like I ought to be able to use some of the bootstrap examples like Dojo Bootstrap Map instead. None of the examples I've seen have this accordion/titlePane feel to it. In the dojo bootstrap, it sounds like there is a module Collapse, which is the closest look and feel to what I want. Here's my ignorance - can I just grab that one component, collapse.js and any corresponding css, if there is any, and add it to my project assuming I'm referencing it properly? So far I've only used the original basic Dojo components in my project. I don't know jQuery and it seems like I can continue on the 'dojo only' path for my development.
... View more
04-21-2015
02:30 PM
|
0
|
1
|
3273
|
|
POST
|
I got it to work. I had to add quotes as a string around the field name. var distFieldPath = "MCDS_DATAWAREHOUSE.EDAPPGISSCHLDIRT.%SCHOOL_DIRECTORY_DISTRICT";
var fieldName = distFieldPath + ".DCOUNTY";
var whereClause = ' " ' + fieldName + ' " ' + " LIKE '%" + currentCounty + "%'";
... View more
04-14-2015
12:25 PM
|
0
|
0
|
983
|
|
POST
|
I feel like most people are using Nilu's TOC. I thought the instructions for implementing as dojo AMD were pretty straight forward.
... View more
04-14-2015
12:20 PM
|
0
|
3
|
4266
|
|
POST
|
Let me dig around. The problem is the project I created this for contains sensitive data, so the services are locked. I think this one is working: Cluster Example
... View more
04-13-2015
01:09 PM
|
2
|
2
|
3126
|
|
POST
|
This is for the where clause of a FeatureLayer.selectFeatures. I have used a variable for a field name, but this is the first time I've tried to get this to work with a field name coming from a join to a SQL Server database table. I know the single quote/double quote looks strange, but hard coded, this is the only way it works. I assume this is because the field names from the join contain %, so I needed to surround the field name with extra punctuation. I started off with this and it works: var whereClause = '"MCDS_DATAWAREHOUSE.EDAPPGISSCHLDIRT.%SCHOOL_DIRECTORY_DISTRICT.DCOUNTY"' + " LIKE '%" + currentCounty + "%'"; The database is different from test to production and I need to set some variables instead. var countyFieldName = "MCDS_DATAWAREHOUSE.EDAPPGISSCHLDIRT.%SCHOOL_DIRECTORY_DISTRICT.DCOUNTY";
var whereClause = countyFieldName + " LIKE '%" + currentCounty + "%'"; This doesn't work. When you put in a breakpoint, the syntax looks OK. I'm using LIKE because DCOUNTY has trailing blanks in it and I have no control over this agency's database. I would actually prefer to just set the variable as MCDS_DATAWAREHOUSE.EDAPPGISSCHLDIRT.%SCHOOL_DIRECTORY_DISTRICT, which is the database name and just concatenate the field names. I have this set earlier for my infoTemplates. I couldn't wrap my head around this: var distFieldPath = "MCDS_DATAWAREHOUSE.EDAPPGISSCHLDIRT.%SCHOOL_DIRECTORY_DISTRICT";
var whereClause = distFieldName + ".DCOUNTY LIKE '%" + currentCounty + "%'"; That's not quite right, because I need to punctuate the field name.
... View more
04-07-2015
02:18 PM
|
0
|
1
|
3333
|
| 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
|