|
POST
|
I am usign the below code to return results to a popup. When there is more than one features returned it reports how many were found dom.byId("featureCount").innerHTML = popup.features.length + " feature(s) selected";
Additionally it allows the user to scroll through the returned features popup.features.length > 1 ? domUtils.show(dom.byId("pager")) : domUtils.hide(dom.byId("pager"));
Right now it will return "5 Feature(s) selected" As I scroll through the list their attributes are shown but nothing more. My question is can I capture the index of the feature being displayed as the user scrolls through the returned features. So it will still say "5 Feature(s) selected" and below that it will return the index number of the one being displayed. As they move through the list that index number will update itself... This possible? If so How do I get the index value of the feature being displayed at that given time?
function initializeSidebar(map){
var popup = map.infoWindow;
//when the selection changes update the side panel to display the popup info for the
//currently selected feature.
connect.connect(popup, "onSelectionChange", function(){
displayPopupContent(popup.getSelectedFeature());
});
//when the selection is cleared remove the popup content from the side panel.
connect.connect(popup, "onClearFeatures", function(){
dom.byId("featureCount").innerHTML = "Looking for features";
registry.byId("leftPane").set("content", "");
domUtils.hide(dom.byId("pager"));
});
//When features are associated with the map's info window update the sidebar with the new content.
connect.connect(popup, "onSetFeatures", function(){
displayPopupContent(popup.getSelectedFeature());
dom.byId("featureCount").innerHTML = popup.features.length + " feature(s) selected";
//enable navigation if more than one feature is selected
popup.features.length > 1 ? domUtils.show(dom.byId("pager")) : domUtils.hide(dom.byId("pager"));
});
}
... View more
07-03-2014
10:38 AM
|
0
|
1
|
645
|
|
POST
|
From a Simple Edit point of view yes that works.... I open in LibreOffice and see those field formats Make my edits and save open back in ArcMap and it is fine. Although If I open the DBF in LibreOffice and "Save As" excel format those Field Formats in the Header are migrated ot the new Excel file.... WHY is this....is there a way to hide them?
... View more
07-03-2014
08:47 AM
|
0
|
0
|
2182
|
|
POST
|
I have one question....I bring a DBF into Libre Office and the headers have extra characters. HAVE you seen this before????? It appears as if the definition of the Column... Example: Field1 N, 10, 3 Field1 is the name N is for numeric 10 is length of field 3 is the number of sig digits Example: Field2 C, 50 Field2 is the field name C is for CHAR 50 is the field length
... View more
07-02-2014
01:26 PM
|
0
|
0
|
2182
|
|
POST
|
I am banging my head against the wall.... I cannot find out where to change the color of the Text thats in the window that pops up over the map when you select the Polygon or freehand polygon button in this example... The text in my app is set to White and as such I cannot see it. Can I specifiy in this tool to make the text black? http://developers.arcgis.com/javascript/samples/gp_clipasync/
... View more
07-01-2014
01:42 PM
|
0
|
1
|
957
|
|
POST
|
I use Libre Office at home. Open Office is similar. Their spreadsheet programs both save to dbf unlike the newer Excel. Is Libre Office a cloud based solution? We will be working with sensitive data and need security.... I just installed and does not look like cloud based. I have installed files...just want to make sure sensitive data will remain secure
... View more
06-30-2014
09:14 AM
|
0
|
0
|
2182
|
|
POST
|
The other two buttons work great.... MODIFY: THANKS...I was missing the Dojo/on Exactly what I needed....Learning everyday....much appreciated.
var action1, action2, action3;
registry.byId("polygon").on("click", function() {
if (action2 != undefined) {
action2.pause();
}
if (action3 != undefined) {
action3.pause();
}
if (action1 == undefined) {
activateTool(this.id);
}
else {
action1.resume();
}
});
registry.byId("freehandpolygon").on("click", function() {
if (action1 != undefined) {
action1.pause();
}
if (action3 != undefined) {
action3.pause();
}
if (action2 == undefined) {
activateTool(this.id);
}
else {
action2.resume();
}
});
registry.byId("RegionSelection").on("click", function() {
if (action1 != undefined) {
action1.pause();
}
if (action2 != undefined) {
action2.pause();
}
if (action3 == undefined) {
map.graphics.clear();
var highlightSymbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255, 0, 0]), 1),
new Color([125, 125, 125, 0.35]));
action3 = on.pausable(petroFieldsFL2, "click", function(evt) {
map.graphics.clear();
highlightGraphic = new Graphic(evt.graphic.geometry, highlightSymbol);
map.graphics.add(highlightGraphic);
var query = new Query();
query.geometry = highlightGraphic.geometry.getExtent();
});
}
else {
action3.resume();
}
});
function activateTool(tool) {
map.graphics.clear();
// The draw.activate expects a string like "polygon" or "freehand_polygon".
selectionToolbar.activate(tool);
}
... View more
06-30-2014
08:32 AM
|
0
|
0
|
684
|
|
POST
|
Yea I did that...although I cannot download anything to my computer...Gotta love IT/IS. I am looking for something as close to Excel as I can get...was looking for some suggestions. Was looking at this one but seems like there were many steps and windows to navigate through to do simple stuff. That and I did not see a Sort column option. http://www.alexnolan.net/software/dbf.htm
... View more
06-30-2014
05:19 AM
|
0
|
0
|
2182
|
|
POST
|
Looking for a good FREE DBF editor. If no real good ones then one that does not cost much.... Anyone have any thoughts?
... View more
06-28-2014
10:12 AM
|
0
|
9
|
4634
|
|
POST
|
I was able to trick it with the code in REd below....This is the only way I can figure out how to turn off the Feature Map Click in the Third Button... I know this is not the right way...there has to be a more correct way.....Any thoughts?
<button id="polygon"
data-dojo-type="dijit/form/Button"
data-dojo-props="iconClass:'polyIcon', showLabel:false">
Polygon
</button>
<button id="freehandpolygon"
data-dojo-type="dijit.form.Button"
data-dojo-props="iconClass:'freehandIcon', showLabel:false">
Freehand
</button>
<button id="RegionSelection"
data-dojo-type="dijit.form.Button"
data-dojo-props="iconClass:'freehandIcon', showLabel:false">
RegionSelection
</button>
<button id="Buffer"
data-dojo-type="dijit.form.Button"
data-dojo-props="iconClass:'freehandIcon', showLabel:false">
Buffer
</button>
var action1, action2;
var action3, action4;
registry.byId("polygon").on("click", function() {
if (action1 != undefined) {
action2.pause();
action3.pause();
action4.pause();
}
if (action1 == undefined) {
petroFieldsFL2.on("click", function (evt) {
map.graphics.clear();
});
activateTool(this.id);
}
else {
action1.resume();
}
});
registry.byId("freehandpolygon").on("click", function() {
if (action1 != undefined) {
action1.pause();
action3.pause();
action4.pause();
}
if (action2 == undefined) {
//alert("Freehand");
petroFieldsFL2.on("click", function (evt) {
map.graphics.clear();
});
activateTool(this.id);
}
else {
action2.resume();
}
});
registry.byId("RegionSelection").on("click", function() {
if (action1 != undefined) {
action1.pause();
action2.pause();
action4.pause();
}
if (action3 == undefined) {
action3 = RegionalSelectionMap(map);
}
else {
action3.resume();
}
});
registry.byId("Buffer").on("click", function() {
if (action1 != undefined) {
action1.pause();
action2.pause();
action3.pause();
}
if (action4 == undefined) {
map.graphics.clear();
action3 = FourthButton(map);
}
else {
action4.resume();
}
});
function RegionalSelectionMap() {
map.graphics.clear();
selectionToolbar.deactivate();
var highlightSymbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255, 0, 0]), 1),
new Color([125, 125, 125, 0.35]));
petroFieldsFL2.on("click", function (evt) {
map.graphics.clear();
highlightGraphic = new Graphic(evt.graphic.geometry, highlightSymbol);
map.graphics.add(highlightGraphic);
var query = new Query();
query.geometry = highlightGraphic.geometry.getExtent();
});
}
function FourthButton() {
map.graphics.clear();
selectionToolbar.deactivate();
petroFieldsFL2.on("click", function (evt) {
map.graphics.clear();
});
}
... View more
06-27-2014
12:44 PM
|
0
|
0
|
684
|
|
POST
|
I have 4 Buttons... the first two seems to work fine. ....The first one allows the user to draw a polygon ....The Second one allows the user to draw Freehand I click the 3rd and it pauses the first 2 and a single click in the map highlights the Region So far so good After Clicking the 3rd button and doing a map selection Go back and click one of the first 2 buttons to Draw....the drawing works fine BUT you can single Click and select a Region which was the code in the 3rd Button. I still cant seem to figure out how to Stop that code from running on a Feature Map Click (from the third button) Can anyone place their eyes on the source code of this page and see what I am doing wrong? https://fwisweb1.dgif.virginia.gov/dgifmapping/DataExtract3.html
... View more
06-27-2014
12:18 PM
|
0
|
3
|
965
|
|
POST
|
.......................................................................
... View more
06-27-2014
12:17 PM
|
0
|
0
|
1088
|
|
POST
|
I do have one last question. I am doing to below to select a specific feature and create a graphic. Works fine. But I cannot turn it off....how do I turn off the MAP CLICK to this feature. I want to use to have to select the button every time the wish to use this. registry.byId("RegionSelection").on("click", function() {
var highlightSymbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255, 0, 0]), 1),
new Color([125, 125, 125, 0.35]));
petroFieldsFL2.on("click", function (evt) {
map.graphics.clear();
highlightGraphic = new Graphic(evt.graphic.geometry, highlightSymbol);
map.graphics.add(highlightGraphic);
var query = new Query();
query.geometry = highlightGraphic.geometry.getExtent();
})
});
... View more
06-27-2014
07:37 AM
|
0
|
0
|
1088
|
|
POST
|
Yes this is....perfect.....Cheers...I simply need the Geometry of the selected Feature. I am then using that Geometry to feed an Extract GP tool... Thanks
... View more
06-27-2014
06:31 AM
|
0
|
0
|
1088
|
|
POST
|
I think I can do something like this
map.on("click", function(evt) {
selectQuery.geometry = evt.mapPoint;
petroFieldsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(features) {
if (features.length > 0) {
//store the current feature
updateFeature = features[0];
// Dont know how to Highlight the feature
// How do I grab its Geometry and use it for a Buffer Select
} else {
}
});
});
... View more
06-27-2014
05:46 AM
|
0
|
0
|
1088
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|