POST
|
What about enterprise geodatabase customization, such as arcobjects class extensions? I don't see how/where one would do this with ArcGISPro.
... View more
01-28-2019
11:56 AM
|
1
|
0
|
694
|
POST
|
Thanks so much Robert! I really appreciate it! -Stefan
... View more
12-21-2015
07:08 PM
|
0
|
0
|
423
|
POST
|
Robert, the code is attached- sorry it's pretty messy right now. I was able to incorporate an event and function to one of ESRI's select samples and your suggestion worked so there is something definitely wrong with my code. The event fires when you choose an item from the select tool. If you type 'sound' in the search box several results will appear so just pick one of those. I really appreciate your help! -Stefan
... View more
12-21-2015
05:08 PM
|
0
|
2
|
423
|
POST
|
Thanks for the quick response! I added: "dojo/_base/lang" and lang in the require/function sections, tested and the page was able to load. It was not able to load when I only added "lang" and lang. I then added the event and function code and got the message "Type error: test is not a function" in the console. Any idea as to what I am doing wrong? Thanks! -Stefan
... View more
12-21-2015
03:15 PM
|
0
|
4
|
423
|
POST
|
I have two events and I want them both to trigger the same code. The obvious answer is to have each event call the same function but i cant figure out how to do this. For example, say i am using the esri search dijit s: on(s, "search-results", function(evt) { console.log('event fired'); test(evt); }); I have confirmed that the event gets fired but the function test is not found. Is this a scope issue? Any ideas? Thanks! -Stefan
... View more
12-21-2015
02:32 PM
|
0
|
6
|
2695
|
POST
|
Thanks again Ken! That seems to be the right track. I'll put some more time into it next week. Cheers, Stefan
... View more
09-10-2014
09:10 PM
|
0
|
0
|
416
|
POST
|
Thank Ken! I had thought about that but I did not think you could format a variable that was going into a store. Given I have the variables sponsor and projTitle, how would I do this? I tried this: sponsor.bold() + projTitle but it just added the html tag as text: <b>Seattle-</b> Some Project Thanks again!
... View more
09-10-2014
09:14 AM
|
0
|
2
|
416
|
POST
|
Say I have the following text in a ComboBox: Sponsor: Project Title Is it possible to just make Sponsor: bold? I can make the whole thing bold by adding the following to the CSS: .dijitMenuItem { font-weight: bold; } But not sure how I would do it for only part of the text. If it's any help, The two pieces of text can come from two different fields in a feature layer. I am using a Query/QueryTask to populate the ComboBox. Thanks for any help! Here is a link to the actual site: http://webmap.psrc.org/Transportation/2015-2018TIP.html
... View more
09-09-2014
12:57 PM
|
0
|
4
|
1045
|
POST
|
I have a DataGrid that gets updated when the user hovers over certain features. It works fine, but I need to format some of the fields/values. I am trying to use the formatter method that is supposed to call a function in the javascript script section. As far as I can tell, the function is not being called. Here is the markup: <div id="bottomPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'bottom'"> <b>Financial Data:</b> <table data-dojo-type="dojox.grid.EnhancedGrid" data-dojo-id="grid" id="grid" data-dojo-props="rowsPerPage:'5', rowSelector:'20px'" style="height:250px; width:100%"> <thead> <tr> <th field="Phase" width="50px" >Phase</th> <th field="Year" width="50px">Year</th> <th field="FedFundSource" width="50px">Funding Type</th> <th field="FedFundAmount" formatter= "formatCost" >Federal Funding</th> <th field="StateFundAmount" formatter= "formatCost" >State Funding</th> <th field="LocalFundAmount" formatter= "formatCost" >Local Funding</th> <th field="SponsorObDate" width="100px">Projected Obligation Date</th> </tr> </thead> </table> </div> And here is the function: function formatCost (Cost) { console.log("%s", "got here"); return "$" + Cost.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); } Any advice is much appreciated! -Stefan
... View more
08-28-2014
04:40 PM
|
0
|
2
|
2616
|
POST
|
Thanks so much Owen, and sorry that my example was a little sloppy- I put it together today during my kid's nap after spending most of yesterday trying to get it to work on our existing application. You are a life saver! Cheers, Stefan
... View more
08-01-2014
07:26 PM
|
1
|
0
|
744
|
POST
|
Hello, I am having a really hard time getting a combobox to populate in an existing web app I am working on so I decided to re-write an old ComboBox sample and still cannot get it to work. I really want to get it to work using the new coding structure. Here is the link to the old sample: Using JavaScript to populate a ComboBox with unique values | ArcGIS Blog Here is my attempt. Thanks in advance for any help ! <!DOCTYPE html> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Populate dropdown list with unique values</title>
<link rel="stylesheet" type="text/css"
href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.10/js/dojo/dijit/themes/tundra/tundra.css">
<style type="text/css">body,html,#main{margin:0;padding:0;height:100%;width:100%;}</style>
<script src="http://js.arcgis.com/3.10/"></script>
<script>
var map;
var resizeTimer;
require(["esri/map", "esri/tasks/query", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/form/ComboBox", "dojo/data/ItemFileReadStore","dojo/store/Memory "dojo/domReady!"], function(Map, query, parser, BorderContainer, ContentPane, ComboBox, ItemFileReadStore, Memory) {
parser.parse();
map = new Map("map", {
basemap: "topo",
//center: [-122.45, 37.75], // longitude, latitude
center : [-85.915,38.105],
zoom: 13
});
var queryTask = new esri.tasks.QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2");
//Define query parameters
var query = new esri.tasks.Query();
query.outFields = ["ZONING_TYPE"];
query.returnGeometry = false;
query.where = "ZONING_TYPE <> ''"
queryTask.execute(query,populateList);
//var initialExtent = new esri.geometry.Extent(-85.915,38.105,-85.52,38.33,
// new esri.SpatialReference({wkid:4326}) );
// map = new esri.Map("map", {extent:initialExtent});
//Create tiled and dynamic map services and add to the map - for the dynamic service set the transparency
//and provide an id so we can access it later
map.addLayer(new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"));
map.addLayer(new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer",
{"opacity":.4,"id":"dynamic"}));
function populateList(results) {
//Populate the dropdown list box with unique values
var zone;
var values = [];
var testVals={};
//Add option to display all zoning types to the dropdown list
values.push({name:"ALL"})
var features = results.features;
dojo.forEach (features, function(feature) {
zone = feature.attributes.ZONING_TYPE;
if (!testVals[zone]) {
testVals[zone] = true;
values.push({name:zone});
}
});
var dataItems = {
identifier: 'name',
label: 'name',
items: values
};
var store = new dojo.store.Memory({data:dataItems});
dijit.byId("mySelect").store = store;
}
function applyLayerDef(selItem){
//Filter the layer to display only the selected zoning types
if (selItem.value !== 'ALL') {
var layerDefs = [];
layerDefs[2] = "ZONING_TYPE = " + "'" + selItem.value + "'";
layerDefs.visibleLayers = [2];
map.getLayer("dynamic").setLayerDefinitions(layerDefs);
}
else {
map.getLayer("dynamic").setDefaultLayerDefinitions();
}
}
function resizeMap() {
//Handle browser resize
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
map.resize();
map.reposition();
}, 800);
}
});
</script>
</head>
<body class="claro">
<div id="main"
dojotype="dijit.layout.BorderContainer"
design="headline"
gutters="true">
<div id="header"
dojotype="dijit.layout.ContentPane"
region="top"
style="height:25px;">
<select id="mySelect"
dojotype="dijit.form.ComboBox"
style="width:300px;font-size:18px;"
autoComplete="true"
forceValidOption="false"
value="Select Zoning Type"
onchange="applyLayerDef(this)"></select>
</div>
<div id="map"
dojotype="dijit.layout.ContentPane"
region="center"
style="border:1px solid #000;margin:5px">
</div>
</div>
</body>
</html>
... View more
08-01-2014
02:24 PM
|
0
|
2
|
2676
|
POST
|
Hi, We are doing something similar using slope as a cost factor in optimal path routing for cycling. Anyyone have a good rule of thumb for modifiying a cost variable (currently edge distance) using an edge based slope attribute? Thanks! -Stefan
... View more
09-06-2012
03:05 PM
|
0
|
0
|
1656
|
POST
|
All of my development experience with ArcServer has been with the Web ADF and since ESRI is dropping it at 10.1, I am thinking that I'll be switching over to the JavaScript API. Our next project will be a web application that allow users to digitize & submit potential transportation projects, which are represented as polylines. These polylines need to sit, topologically speaking, on top of our network, as they will eventually be used to update our base network in our Travel Demand Model (e.g. add a lane to a section of highway). While we consider this a network, we are not using a network data set or network analyst. So I am wondering, without using Network analyst, is there a way for a user to click on the network and trace the project route on the underlying transportation line work, and the click again when finished, resulting in a polyline that shares the same vertices as the line work underneath. If not, I imagine it would be pretty easy for the user to select the portions of the network that make up their project and create a new polyline from those selected line features. Is this the case? Many thanks! -Stefan
... View more
01-27-2012
02:28 PM
|
0
|
3
|
1013
|
Title | Kudos | Posted |
---|---|---|
1 | 01-28-2019 11:56 AM | |
1 | 08-01-2014 07:26 PM |
Online Status |
Offline
|
Date Last Visited |
02-09-2022
04:35 PM
|