POST
|
Hi all, so here is my form with search field and button <form onsubmit="doFind();"> <button data-dojo-type="dojox/mobile/Button" onClick="doFind();" class="findButton" value="Search" id="buttonSearch"/>Search</button></form> however all I can do is click the button to execute it won't work when I press enter when cursor is in the input box. Plus sometimes key pads tend to work as navigation not number "whether num lock is on or off" on chrome FF IE all work like that Do anyone know what's going on? Thanks, Jack
... View more
02-25-2014
06:48 AM
|
0
|
1
|
589
|
POST
|
function onResults(results) {
map.graphics.clear();
var geom = results.features[0].geometry;
var extent = geom.getExtent();
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.sym bol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([80,0,0]), 2), new dojo.Color([255,255,0,0.5]));
var graphic = results.features[0];
map.graphics.add(graphic);
map.setExtent(extent, true);
}
It zooms into the result but no graphic change. I'm not sure what did I miss here? Please help me thanks,
... View more
02-25-2014
06:24 AM
|
0
|
0
|
587
|
POST
|
Are the connection properties in the data store registration page the same as the connection properties to the geodatabase in the map document properties? Randall, Yes, both Server Properties registered database and database connection are the same (same authentication as well) Thanks,
... View more
11-15-2013
09:44 AM
|
0
|
0
|
227
|
POST
|
Hi all, I was about to publish a map to the ArcServer but (not sure since when) every layers that I have in the map shows Code 24011 Layer's data source is not registered with the server and data will be copied to the server all layers are in SDE server and all connected fine. also when I check server properties Server Properties > Data Store > Registered Databases there are registered databases that I use. Now what should I check to solve this problem? I've watched videos that registering databases and folders. Thank you, Jack
... View more
11-15-2013
07:26 AM
|
0
|
2
|
759
|
POST
|
Jack, The build number of 10.1 SP1 is 3143. I don't think, applying 10.1 SP1 will fix the error. You can take a look at this forum post which is specific to the problem you are facing. Regards, Thank you for comment Nidhin, Jack
... View more
10-24-2013
05:24 AM
|
0
|
0
|
162
|
POST
|
Hi all, I just installed 10.1 SP1 for server because of ERROR 001272: Analyzer errors were encountered (codes = 7) however still getting same problem. Wanted to make sure that the server upgrade went fine. Software version: 10.1.1 (build 3143) is this 10.1 SP1? Thanks, Jack
... View more
10-23-2013
08:26 AM
|
0
|
3
|
1989
|
POST
|
You can hide the header in css
.dojoxGrid-header { display:none; } Thanks! but it didn't work tho
... View more
09-13-2013
08:13 AM
|
0
|
0
|
490
|
POST
|
Hi, so I was using search function with dojo grid but I don't need top row (showing field name) Does anyone know how? Thanks, <table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="grid" id="grid" data-dojo-props="rowsPerPage:'1', rowSelector:'10px'" style="width:100%"> <thead> <tr><th field="OBJECTID" width="320"></th></tr> <tr><th field="Name" width="320"></th></tr> <tr><th field="Abbr" width="320">Camp</th></tr> </thead> </table
... View more
09-12-2013
12:41 PM
|
0
|
3
|
3868
|
POST
|
The process would be something like this: Create a new popup / infoWindow for your app as shown in all the examples For each layer that needs a popup, create an infoTemplate and then specify it during the layer creation Create on onClick event listeners (dojo.connec in legacy Dojo) for each layer which contains a query on the layer Here's some cobbled together legacy code (v3.3 of the API) as a guide: var usgsTemplate = new esri.InfoTemplate();
usgsTemplate.setContent('<table cellspacing=\"5\" style=\"font-size:90%\"><tr><td style=\"text-align:top\"><b>Gage Location:</b></td><td style=\"vertical-align:top\">${NAME}</td></tr><tr><td style=\"vertical-align:top\"><b>Latest Graph:</b></td><td style=\"vertical-align:top\"><a href=\"${url}\" target=\"_blank\">Click to View<\a></td></tr></table>');
usgsTemplate.setTitle('USGS Stream Gage');
var floodplainTemplate = new esri.InfoTemplate();
floodplainTemplate.setContent(setFloodplainPopupContent);
floodplainTemplate.setTitle('100-Year Floodplain');
popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))
}, dojo.create("div"));
// Create the map
map = new esri.Map("map", {
extent:initExtent,
minScale: 4750000,
basemap: 'streets',
infoWindow:popup,
outFields: ["*"]
});
theUsgsLayer = new esri.layers.FeatureLayer(SERVERPATH + "/hydrography/swmStreamGages/MapServer/0", {
id: 'usgsGageLayer',
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate:usgsTemplate,
outFields: ["*"],
visible: true
});
theFloodplainLayer = new esri.layers.FeatureLayer(SERVERPATH + "/environmental/femaFloodPlain/MapServer/0", {
id: 'femaFloodplainLayer',
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate:floodplainTemplate,
outFields: ["*"],
opacity:0.35,
visible: false
});
.
. //Later on in the init() function...
.
.
//Listener event for feature selection and the popup info widow
dojo.connect(theUsgsLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theUsgsLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.resize(350,300);
map.infoWindow.setFeatures([deferred]);
map.infoWindow.show(evt.mapPoint);
});
//Listener event for feature selection and the popup info widow
dojo.connect(theFloodplainLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theFloodplainLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.resize(200,175);
map.infoWindow.setFeatures([evt.graphic]);
map.infoWindow.show(evt.mapPoint);
});
Hope that points you in the right direction. You can also search the forum for identifyTask an popup/infoWindow and you might find some other examples. Good luck! Steve Thank you Steve!
... View more
09-05-2013
06:25 AM
|
0
|
0
|
211
|
POST
|
Hi all, I was looking for a sample for popup function. However all the samples have only clickable from one layer. I would like to have multiple layers to be able to click and show popup window. Is there any sample that I can get the idea of it?
... View more
09-04-2013
01:06 PM
|
0
|
3
|
542
|
POST
|
I should have post code as well, my bad.
store = new dojo.data.ItemFileReadStore({ data:data });
dojo.style(dojo.byId("grid"), "width", "280px");
dojo.style(dojo.byId("grid"), "height", "150px"); //obviously this was not working
var grid = dijit.byId('grid');
grid.setStore(store);
grid.resize();
autoWidth: true;
autoHeight: true;
map.centerAndZoom(center, zoom);
}
<div class ="toggle" id="menu_subA">Enter building number, name and abbreviation<br>
<input type="text" id="searchField" size="30" value="" /><button data-dojo-type="dijit.form.Button" onClick="doFind();" value="Search">Search</button>
<table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="grid" id="grid" data-dojo-props="rowsPerPage:'1', rowSelector:'10px'">
<thead>
<tr>
<th field="Number" width="50">Num</th>
<th field="Abbrev" width="50">Abbr</th>
<th field="CampusCode" width="50">Camp</th>
</tr>
</thead>
</table>
</div>
... View more
07-16-2013
10:53 AM
|
0
|
0
|
781
|
POST
|
Hi, I'm using dojo data grid for my search results. but it stretched out longer that it should be. can anyone tell me what how to set the size for the table? [ATTACH=CONFIG]25969[/ATTACH] Thank you.
... View more
07-16-2013
07:13 AM
|
0
|
4
|
3358
|
POST
|
hi if you did the zoom to search result , pleas share it . i need to do some like that. Thanks I haven't succeed yet findTask = new esri.tasks.FindTask("http://localhost:6080/arcgis/rest/services/FC/AapInfo/MapServer");
dojo.connect(map, "onLoad", function() {
findParams = new esri.tasks.FindParameters();
findParams.returnGeometry = true;
findParams.layerIds = [2];
findParams.searchFields = ["OBJECTID","Number","Abbrev","CampusCode"];
findParams.outSpatialReference = map.spatialReference;
console.log("find sr: ", findParams.outSpatialReference);
}); function doFind() {
findParams.searchText = dojo.byId("searchField").value;
findTask.execute(findParams,showResults);
}
function showResults(results) {
map.graphics.clear();
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([98,194,204]), 2), new dojo.Color([98,194,204,0.5]));
var items = dojo.map(results,function(result){
var graphic = result.feature;
graphic.setSymbol(symbol);
map.graphics.add(graphic);
return result.feature.attributes;
});
var data = {
identifier: "OBJECTID",
label: "OBJECTID",
items: items
};
store = new dojo.data.ItemFileReadStore({ data:data });
grid.setStore(store);
map.centerAndZoom(center, zoom);
}
function onRowClickHandler(evt){
var clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID;
var selectedTaxLot;
dojo.forEach(map.graphics.graphics,function(graphic){
if((graphic.attributes) && graphic.attributes.OBJECTID === clickedTaxLotId){
selectedTaxLot = graphic;
//alert(selectedTaxLot);
return;
}
});
var taxLotExtent = selectedTaxLot.geometry.getExtent();
map.setExtent(taxLotExtent);
} <input type="text" id="searchField" size="30" value="" /><button data-dojo-type="dijit.form.Button" onClick="doFind();" value="Search">
Search
</button>
<table data-dojo-type="dojox.grid.DataGrid" data-dojo-id="grid" id="grid" data-dojo-props="rowsPerPage:'5', rowSelector:'10px'">
<thead>
<tr>
<th field="Number" width="50">Num</th>
<th field="Abbrev" width="50">Abbr</th>
<th field="CampusCode" width="50">Camp</th>
</tr>
</thead>
</table> All i can get is result highlighted on the map but no return on "dojo grid " at the <table> if someone knows why please HELP!
... View more
06-26-2013
06:27 AM
|
0
|
0
|
202
|
POST
|
Hello, I made a very simple map but it won't change the initial map center. can anyone give me some advice? Thank you, Jack <script>
dojo.require("esri.map");
var map;
function init() {
map = new esri.Map("mapDiv", {
center:[-96,30],
});
var dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://localhost:6080/arcgis/rest/services/FCOR/BaseMapTileTest/MapServer", {
});
map.addLayer(dynamicMapServiceLayer);
}
dojo.ready(init);
</script>
</head>
<body>
<div id="mapDiv"></div>
</body>
</html>
... View more
05-16-2013
06:56 AM
|
0
|
1
|
491
|
POST
|
There are 2 things I can point out by looking at your code : 1. you have used a popup to define map's infoWindow property, but never created the popup in your code. 2. there can be some issues with extent you have defined. try the following for your init function: map = new esri.Map("map");
var baseMapLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://localhost:6080/arcgis/rest/services/COR/basemap/MapServer");
map.addLayer(baseMapLayer);
keep the map as simple as possible at first and check if you see the basemap and once you get your basemap to work, slowly start adding more properties to it. Let me know if it helps. Thanks Shreyas, It worked! and a infoWindow is using for the popup but other code was not showing. Thanks again
... View more
05-10-2013
05:28 AM
|
0
|
0
|
209
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|