<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9,IE=10" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="http://js.arcgis.com/3.9/js/dojo/dojo/resources/dojo.css" rel="stylesheet">
<link href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css" rel="stylesheet">
<link href="http://js.arcgis.com/3.9/js/esri/css/esri.css" rel="stylesheet">
<script src="http://js.arcgis.com/3.9/"></script>
<script>
require(['dojo/_base/lang',
'dojo/dom-construct',
'dojo/dom',
'dojo/_base/html',
'esri/arcgis/utils',
"esri/toolbars/draw",
"/Scripts/AGIS/utils.js",
'esri/InfoWindowBase', "dojo/has", "dojo/_base/sniff", "dojo/domReady!"
], function (lang, domConstruct, dom, html, esriUtils, Draw, utils, infoWindow, has,d) {
var mapDiv = html.create('div', {
id: "map",
style: lang.mixin({
position: 'absolute',
backgroundColor: '#EEEEEE',
overflow: 'hidden'
}, utils.getPositionStyle({
"left": 0,
"top": 0,
"right": 0,
"bottom": 0
}))
});
html.place(mapDiv, "agis-layout-manager");
var b = navigator.userAgent;
console.log(b);
alert(b);
var a = b.match(/Android\s+(\d+\.\d+)/i);
a && alert("a[0]=" + a[0]);
a && alert(parseFloat(a[0]));
a && alert("a[1]=" + a[1]);
a && alert(parseFloat(a[1]));
a && alert("a[2]=" + a[2]);
a && alert(parseFloat(a[2]));
var c = b.match(/(iPhone|iPad|CPU)\s+OS\s+(\d+\_\d+)/i);
c && alert("c[0]=" + c[0]);
c && alert("c[1]=" + c[1]);
c && alert("c[2]=" + c[2]);
alert('d("esri-iphone") =' + d("esri-iphone"));
alert('d("esri-android") =' + d("esri-android"));
alert('d("esri-touch") = ' + d("esri-touch"));//true
alert('d("esri-pointer") = ' + d("esri-pointer"));//undefined
var mapDef = esriUtils.createMap("8e900bdba72f451cbf5141a9a6073532", "map");
mapDef.then(lang.hitch(this, function (response) {
var map = response.map;
if (map.loaded) {
_initMap(map);
} else {
dojo.connect(map, "onLoad", function () {
_initMap(map);
});
}
}));
var _initMap = function (map) {
//map.enableDoubleClickZoom();
alert("map.isDoubleClickZoom is " + map.isDoubleClickZoom);
alert("map.isPan is " + map.isPan);
};
});
</script>
</head>
<body class="claro">
<div id="main">
<div style="position:relative; margin:0; padding:0; width:100%; height:100%;">
<div style="position:relative;width:100%; height:100%;z-index:0;" id="agis-layout-manager">
</div>
</div>
</div>
</body>
</html>
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.
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.
Ideally, yes.
What specific browser/device combo are you having double-tap issues with?
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);
}));
Touch should be working correctly in all device/software combinations in the next release.
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); }));