|
POST
|
I have seen layer.declaredClass as well, but usually for custom objects. you could try instanceof if ((this.rootLayer instanceof (ArcGISDynamicMapServiceLayer) || this.rootLayer instanceof (ArcGISTiledMapServiceLayer))) you could also console.dir(layer) and sniff the properties in Firebug to see if there is a declaration somewhere
... View more
07-01-2014
09:36 AM
|
1
|
0
|
1245
|
|
POST
|
on first click, is geometryToBuffer valid or is it null
... View more
07-01-2014
04:49 AM
|
0
|
0
|
686
|
|
POST
|
as much as you can sniff an obfuscated API, it looks like your point is failing the _IsTextSymbol internal check of edit.js
... View more
06-30-2014
12:31 PM
|
0
|
0
|
2840
|
|
POST
|
odd. ok it is coming back as a point. Which is good. You are setting the point with a textsymbol properly. however when you pass that to editToolbar.activate(Edit.EDIT_TEXT, selected); i get the [esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type. Which is why you cant close it, because it wasnt properly created. What I can't figure out is, why not? it looks like everything is fine.
... View more
06-30-2014
11:20 AM
|
0
|
0
|
2840
|
|
POST
|
i am getting Uncaught Error: [esri.toolbars.Edit::activate] Unable to activate the tool. Check if the tool is valid for the given geometry type. edit.js:22 w.activate edit.js:22 ctxMenuForGraphics.addChild.MenuItem.onClick (index):118 k.onItemClick _MenuBase.js:8 (anonymous function) _MenuBase.js:4 (anonymous function)
... View more
06-30-2014
11:01 AM
|
0
|
0
|
2840
|
|
POST
|
ok i figured out what is breaking. By hooking to on(map.container, tap.doubletap, lang.hitch(this, function(e){
if(e.target.e_graphic){
console.dir(e.target.e_graphic);
this.onLayerDblClick(e.target.e_graphic);
}
})); i am successfully able to fire doubletap events However that completely breaks single tap. I.e. I can no longer select a point by tapping on it. I tried on(map.container, tap, lang.hitch(this, function(e){
if(e.target.e_graphic){
//returns FeatureLayer
console.dir(e.target.e_graphic.getLayer());
e.target.e_graphic.getLayer().click();
}
})); to get the single click event to fire on single tap but no luck.
... View more
06-30-2014
06:10 AM
|
0
|
0
|
1462
|
|
POST
|
I see what you see tim in Chrome right click to add text right click text to edit choose edit select color, etc.. click map, nothing happens
... View more
06-27-2014
11:10 AM
|
0
|
0
|
1284
|
|
POST
|
Sorry Jon, I know its confusing. Let me do my best to explain. Workflow 1. Add map with feature layer. 2. Touch to select point, try to move, map pan events occur. 3. Add onselectioncomplete listener, if count >1, map.disablemapnavigation(); 4. Touch to select a point, touch and drag to move. Works great 5. Add ondoubletap listener above, leaving in step#3 6. Touch to select a point, touch and hold to move and map pans. Disablemapnavigation has fired, but for some reason, when you attach the doubletap listener, it breaks the "disable" part and the map is still navigating instead of moving the point.
... View more
06-27-2014
05:21 AM
|
0
|
0
|
1462
|
|
POST
|
I'll look into that. In the meantime, see if the following workaround is suitable:
on(map.container, tap.doubletap, lang.hitch(this, function(e){
if(e.target.e_graphic){
console.log("tapped graphic");
}
}));
i added this to my editing widget config code. doubletap events fire great. However it breaks two things fLayer.on("selection-complete", lang.hitch(this, function(graphics){
alert('selection-complete');
// console.dir(graphics);
if(fLayer.getSelectedFeatures().length>0){
if(has('touch')){
//alert('selection complete');
map.disableMapNavigation();
alert('nav disabled');
}
registry.byId("EditContainer").selectChild(registry.byId("editAttributePane"));
fLayer.redraw();
}else{
if(has('touch')){
map.enableMapNavigation();
alert('nav enabled');
}
registry.byId("EditContainer").selectChild(registry.byId("editToolPane"));
}
})); 1. There are two or more featurelayers in a loop. I have an onselectioncomplete event for each that fires map.disableMapNavigation() if a feature is selected. This is necessary to be able to move a selected point. (unfortunately). If i add your code, disableMapNavigation still fires, but touch events still pan the map and break being able to move a point 2. Adding that code, due to scope ,doesnt quite get me to where i need to be. Is there a way (i need to sniff the e.target.e_graphic element) to fire the respective featureLayer's double-click event on the captured double-tap?
... View more
06-26-2014
12:18 PM
|
0
|
0
|
1462
|
|
POST
|
that is the exact code that i want to use, that doesn't work, that i was hoping jon could check on.
... View more
06-26-2014
04:21 AM
|
0
|
0
|
1462
|
|
POST
|
Esri JavaScript API is built on dojo. Dojo handles double tap just fine http://dojotoolkit.org/reference-guide/1.10/dojox/gesture.html
... View more
06-25-2014
07:30 PM
|
0
|
0
|
1462
|
|
POST
|
Ideally, yes. What specific browser/device combo are you having double-tap issues with? to be honest, all of them. Specifically, ipad and samsung galaxy. Double-tap doesnt work at all. Or more specfically, there is no way to catch it. Below is code to show a custom dialog box on double click of a feature layer point. Currently there is no way to attach this to a doubletap event I have tried some suggestions, but each time I attach a doubletap event to the graphic it breaks being able to tap and move a point. var onLayerDblClick= function(evt){
var t = layer.template;
var content = esriLang.substitute(evt.graphic.attributes,t);
var highlightGraphic = new Graphic(evt.graphic.geometry,new SimpleMarkerSymbol());
map.graphics.add(highlightGraphic);
dialog.set("content", content);
domStyle.set(dialog.domNode, "opacity", 0.85);
dialog.show();
dialog.connect(dialog, "hide", function(e){
map.graphics.clear();
});
};
fLayer.on("dbl-click", lang.hitch(this, function(evt){
// alert('dbl click');
onLayerDblClick(evt);
}));
... View more
06-25-2014
10:46 AM
|
0
|
0
|
2342
|
|
POST
|
Thanks for the additional information Joe! I am looking into all touch issues in the Draw and Edit toolbars and you have been very helpful. From what I've seen so far, some older Blackberry specific exceptions were interfering with new IE11 touch events. This might be the same issue affecting Chrome. Touch should be working correctly in all device/software combinations in the next release. Can you verify that tap and double tap will function as well? I am having a heck of a time getting doubletap to fire on a feature layer. IF i manually add it, it breaks placing and moving points.
... View more
06-25-2014
06:23 AM
|
0
|
0
|
2342
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-22-2014 08:35 AM | |
| 1 | 05-02-2012 04:56 AM | |
| 1 | 10-29-2021 07:40 AM | |
| 1 | 10-28-2021 05:26 AM | |
| 1 | 07-17-2012 08:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-01-2022
02:00 PM
|