|
POST
|
well... selecting a graphic and selecting something associated with a graphic aren't exactly the same thing. 🙂 do you have a simplified code sample pointing at public services you can share?
... View more
04-25-2013
10:02 AM
|
0
|
0
|
1325
|
|
POST
|
i took a look at the minified source code and it looks like we are wiring up a mouseMove event handler specific to polygons. once the number of input points is greater than two, an additional path is added to the graphic geometry (connecting back to the first vertex).
_measureAreaMouseMoveHandler : function (evt) {
var _36;
//after the first vertex is created...
if (this.inputPoints.length > 0) {
var _37 = new _15(this._map.spatialReference);
var _38;
//snap if snapping is enabled
if (this._map.snappingManager) {
_38 = this._map.snappingManager._snappingPoint;
}
_36 = _38 || evt.mapPoint;
//add a path between the first vertex and where the mouse is hovering
_37.addPath([this._currentStartPt, _36]);
var _39 = this._densifyGeometry(_37);
//add the geometry to the graphic
this.tempGraphic.setGeometry(_39);
}
//after two verticies have been created...
if (this.inputPoints.length > 1) {
var _3a = new _15(this._map.spatialReference);
//add a path back to the first point
_3a.addPath([_36, this.inputPoints[0]]);
var _3b = this._densifyGeometry(_3a);
//add the geometry to the graphic
this.tempGraphic.setGeometry(this.tempGraphic.geometry.addPath(_3b.paths[0]));
}
},
since the draw toolbar itself doesn't already have an eventHandler to hook up to, you'd have to create your own. to be perfectly honest, i have no idea how you could get a reference to the same kind of "temporary" graphic.
... View more
04-25-2013
09:55 AM
|
0
|
0
|
638
|
|
POST
|
if you've already created the graphics, you should be able to pass them to the default map graphics layer using map.graphics.add(graphic)
... View more
04-25-2013
09:19 AM
|
0
|
0
|
853
|
|
POST
|
when you say the server is offline, does that mean the request is hanging or returning an immediate error? if its hanging, this might be an explanation of why the event is not being triggered. check out this forum thread for more information.
... View more
04-25-2013
09:13 AM
|
0
|
0
|
2404
|
|
POST
|
select how? onClick? onMouseOver? have you seen this sample? it demonstrates how to define a new symbol and pass an existing graphic to display in the map (on top of the existing graphics layer created from QueryTask results)
var highlightSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 3), new dojo.Color([125,125,125,0.35]));
...
dojo.connect(countiesGraphicsLayer, "onMouseOver", function(evt) {
map.graphics.clear(); //use the maps graphics layer as the highlight layer
//pass the event graphic geometry and second symbol
var highlightGraphic = new esri.Graphic(evt.graphic.geometry,highlightSymbol);
map.graphics.add(highlightGraphic);
});
... View more
04-23-2013
02:58 PM
|
0
|
0
|
1325
|
|
POST
|
just an fyi, i tested this in 3.4 and found that a '+' is now acceptable, while a space is not... http://jsfiddle.net/C5mdZ/
... View more
04-23-2013
01:20 PM
|
0
|
0
|
1218
|
|
POST
|
addProxyRule() was added at 3.4 and will allow you to do this.
... View more
04-23-2013
07:43 AM
|
0
|
0
|
499
|
|
POST
|
there might be a better approach, but i was able to substitute a custom locator successfully using this approach.. near line 2697 of main.js
//define the custom locator
var geocoders = [{
url: "http://tasks.arcgisonline.com/ArcGIS/rest/services/Locators/TA_Address_NA_10/GeocodeServer",
name: "NA Geocoder",
//substitute whatever parameter your own locator uses for single line input here
singleLineFieldName: "SingleLine"
}];
_self._geocoder = new esri.dijit.Geocoder({
map: _self.map,
//setting arcgisGeocoder to false ensures that the url specifed for "_self.options.locatorserviceurl" in line 295 won't be used
arcgisGeocoder: false,
theme: 'modernGrey',
//pass in the locator (and options) you defined above
geocoders: geocoders,
autoComplete: true
}, dom.byId("geocoderSearch"));
... View more
04-22-2013
07:45 PM
|
0
|
0
|
2279
|
|
POST
|
im not speaking officially, but ive always understood that we plan on hosting older versions of our API indefinitely.
... View more
04-22-2013
07:30 PM
|
0
|
0
|
620
|
|
POST
|
i haven't done any testing with this at all, but my guess would be that only the graphics being drawn would be "snap enabled".
... View more
04-17-2013
11:55 AM
|
0
|
0
|
1662
|
|
POST
|
im not sure i understand. are you trying to snap to a featureLayer which hasn't been added to the map because youre already drawing it in a DynamicMapServiceLayer?
... View more
04-17-2013
08:45 AM
|
0
|
0
|
1662
|
|
POST
|
this is not currently possible. here's the associated enhancement request. [NIM079605: Add support to LayerDrawingOptions for labelingInfo property in JavaScript API]
... View more
04-16-2013
09:03 AM
|
0
|
0
|
1392
|
|
POST
|
not identical, but check out this sample to see how attributes from the JSON featureset returned by the FindTask are written to a dojo table for an example in action.
... View more
04-16-2013
09:00 AM
|
0
|
0
|
1480
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-16-2014 02:35 PM | |
| 1 | 03-15-2013 04:25 PM | |
| 1 | 06-01-2016 10:51 AM | |
| 1 | 12-28-2015 04:46 PM | |
| 1 | 12-28-2015 05:26 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|