|
POST
|
Welcome on board:) Unfortunately, there is no such attribute table dijit you can use directly using Javascript API. And personally I think since the requirement for an attribute table can be wildly different from project to project, as a software vendor, it's almost impossible for ESRI to develop a generic one that will meet every users' need. However, it's not hard to develop one on your own using various javascript libraries. If using dojo, I'd recommend to use dgrid which is very powerful and perform well. Here is a sample.
... View more
09-22-2013
09:31 AM
|
0
|
0
|
571
|
|
POST
|
Glad to help. If you think your question has been answered, can you mark your thread as "Answered" so other people may find it helpful? Thanks.
... View more
09-21-2013
12:12 PM
|
0
|
0
|
1076
|
|
POST
|
FeatureLayer.fullExtent.spatialReference, or FeatureLayer.graphics -> graphic.geometry.spatialReference
... View more
09-21-2013
12:02 PM
|
0
|
0
|
669
|
|
POST
|
Here it is. Here is the esri identify sample. dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("esri.dijit.Popup");
dojo.require("dijit.form.Button");
var map;
var evtOnMapClick;
function init() {
...
dojo.connect(dijit.byId("identify"), "onClick", btnIdentify_onClick);
}
function btnIdentify_onClick() {
evtOnMapClick = map.on("click", onMapClick);
}
function onMapClick(e) {
// identify the features and display the popup. Refer to esri identify sample
// at the end
if (evtOnMapClick) {
evtOnMapClick.remove();
evtOnMapClick = null;
}
}
... View more
09-20-2013
10:10 PM
|
0
|
0
|
632
|
|
POST
|
Excellent point, Brian. I will definitely give it a try. You have my vote!
... View more
09-20-2013
04:20 PM
|
0
|
0
|
1909
|
|
POST
|
The map object is included in PrintParameters object which will be fed to PrintTask for execution. require([ "esri/map", "esri/tasks/PrintTask", "esri/tasks/PrintParameters", ... ], function(Map, PrintTask, PrintParameters, ... ) { var map = new Map( ... ); var printTask = new PrintTask( ... ); var params = new PrintParameters(); params.map = map; printTask.execute(params, printResult); ... }); You can also use Print dijit to print map. Here are some samples.
... View more
09-20-2013
04:15 PM
|
0
|
0
|
1076
|
|
POST
|
function addGraphic(evt) Make sure evt here is a graphic object, not the event object returned from drawToolbar.onDrawEnd event. Change: theGLayer.add(new esri.Graphic(g)); //map.graphics.add(new esri.Graphic(evt, symbol)); To: theGLayer.add(g); g is already a graphic.
... View more
09-20-2013
01:24 PM
|
0
|
0
|
805
|
|
POST
|
The documentation is not updated with the new event style. What you can do is find the top of the event section, and click Connect Style Events to see the event details. Events [ On Style Events | Connect Style Events ]
... View more
09-20-2013
01:12 PM
|
0
|
0
|
411
|
|
POST
|
Which basemap are you using? With the information provided, I can think of two cases. Case 1: The map projection is different than the feature layer projection. If so, two options. 1.1 Make the two projections the same. Either use different base map or change the map service that contains the feature layer to use the same projection as the base map and republish it. 1.2 Use featureLayer.queryFeatures to make the query. Then within the query callback function, reproject the found features to the map projection. Inside onProjectComplete, create graphics for each reprojected feature, and add them to the map. Case 2: The two found features are very close so that they look like the same spot from a small map scale. Zoom in the map enough to see the detail.
... View more
09-20-2013
01:10 PM
|
0
|
0
|
1644
|
|
POST
|
Define a variable which is a reference to the map.onClick event handler. Define the event handler when the button is clicked, and detach the event handler when the identify operation is complete. So the user has to click the popup button every time to start an identify operation. var evtOnMapClick;
function btnPopup_onClick() {
evtOnMapClick = map.on("click", onMapClick);
}
function onMapClick(e) {
// identify the features and display the popup
// at the end
if (evtOnMapClick) {
evtOnMapClick.remove();
evtOnMapClick = null;
}
}
Hope it helps.
... View more
09-20-2013
12:48 PM
|
0
|
0
|
632
|
|
POST
|
So you can buffer the geocoding result, but not the query result using the buffer polygon, right? After the buffer is drawn on the map, can you see if there is any point feature(s) from the query layer inside the buffer? If so, please provide me two things. 1. mySBIQuery.geometry = Results.geometry; The extent of Results.geometry. I mean the minx, miny, maxx, maxy and spatial reference. You can get the extent using Results.geometry.getExtent(). 2. Change: flSBI.selectFeatures(mySBIQuery, FeatureLayer.SELECTION_NEW); To: flSBI.selectFeatures(mySBIQuery, FeatureLayer.SELECTION_NEW, function(features) {
if (features) {
alert("Number of features selected: " + features.length);
}
}); And tell me if you get anything returned in features from the query. UPDATE: I just noticed that you are using openstreetmap (osm) as your basemap. Since osm uses WGS1984 as its spatial reference, which is different than the web-mercator (102100), the issue may be caused by this. DO a quick test. Change: map = new Map("map", {
extent: initialExtent,
basemap: "osm",
zoom: 3,
sliderPosition: "top-right",
sliderStyle: "small"
}); To: map = new Map("map", {
extent: initialExtent,
basemap: "streets",
zoom: 3,
sliderPosition: "top-right",
sliderStyle: "small"
}); And see if it works as expected.
... View more
09-20-2013
10:35 AM
|
0
|
0
|
1644
|
|
POST
|
Can you tell me which line does not work and what error message do you get? To find out the error message, load your app in Chrome, and press CTRL-SHIFT-i to open the Developer Tools. Then go to Console tab. Run your app until hit the error. Then you should see the error on the Console tab.
... View more
09-20-2013
09:31 AM
|
0
|
0
|
1644
|
|
POST
|
I guessed it might be the projection issue, but thought setExtent will take care of the reprojection if the spatial reference is different. Anyway, glad to know you get it resolved. Please mark your thread as "Answered" so other people may find it helpful because I believe the issue you experienced is very typical. Thanks.
... View more
09-20-2013
05:16 AM
|
0
|
0
|
286
|
|
POST
|
Questions: What error message did you get? What is the spatial type of the parcel data, point or polygon? If points, does the map use any tiled/cached basemap? The code I provided should work for polygons. It won't work for points. For points, here is the code. For the map with only dynamic map services/layers loaded, map.centerAndZoom(graphic, 0.5); For the map with tiled basemap loaded, map.centerAndZoom(graphic, 12); // change 12 to any zoom level you like
... View more
09-19-2013
02:29 PM
|
0
|
0
|
2204
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-17-2013 05:16 AM | |
| 1 | 11-06-2013 04:34 AM | |
| 1 | 08-29-2013 10:58 AM | |
| 6 | 10-20-2020 02:09 PM | |
| 1 | 11-20-2013 06:09 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-17-2024
08:41 AM
|