|
POST
|
Hi Tracy- Here is something that might help you: I've got a global var set outside my define or require to account for whether or not the app is being accessed by a mobile or desktop os: var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
}; Then inside my ready function I setup a conditional: if (isMobile.any()){
document.getElementById("locate_form").style.visibility= "visible"; //hidden test condtion switcher//
} else{
document.getElementById("locate_form").style.visibility= "hidden"; //visible test condtion switcher//
} and then the dom element "locate_form" visibility property then hides or displays the dijit or control. In this case, I am hiding or displaying the geolocate button based on the OS detected: <div id="cpCenter" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'">
<div id="divSearch"></div>
<form id="locate_form">
<div id="LocateButton"></div>
</form>
</div> I understand that this is not the most elegent method and is somewhat of a quick and dirty mediaQuery, but it does work and i would think it should be fairly easy to swap out say a dojo FilteringSelect with a dojox element. It's actually something I want to try next- I have also used this method for controlling snapping using the snapping manager here Syntax Help: If else containing constructor options with a little assistance from Robert Scheitlin, GISP Hope this helps David
... View more
03-19-2015
11:40 AM
|
0
|
0
|
2488
|
|
POST
|
All- The compact bundle files at 10.3 are not visible to a mobile sdk or mpc project. Unless ESRI plans on addressing the issue, tile packages can be used for basemaps in these deployments. Thanks, David
... View more
03-18-2015
08:37 AM
|
0
|
2
|
4220
|
|
POST
|
Conor- You can do that, but the databases cannot be named the same. Its a lot of work and isn't really well designed for sde repositories, but you can use sql database replication if you must have both data sets un-versioned. But unless you have some business logic or exclusionary use case requiring both databases to contain un-versioned data, then I would set up one-way data replication between a parent edit database and a child production database, where the child database contains the un-versioned data. Thanks David
... View more
03-17-2015
01:39 PM
|
0
|
1
|
1176
|
|
POST
|
Ok let's see if I get this right. Since ifMobile is an object, it should never be null unless I am not accounting for a particular OS as part of its properties, I think. That said, I should then be able to flip the script around by invoking(?) snapManager inside of ifMobile thusly: if (isMobile.any()){
console.log("Mobile");
snapManager = mapMain.enableSnapping({
alwaysSnap: true,
tolerance: 5,
snapPointSymbol: snapSym
});
} else {
console.log("Not Mobile");
snapManager = mapMain.enableSnapping({
tolerance: 5,
snapPointSymbol: snapSym,
snapKey: has("mac") ? keys.META : keys.CTRL
});
} And this seems to work pretty well, but I'll know defineitevely once I push this up so I can test on a mobile platform. Thanks also to @michael Stranovsky Thanks for your reply Robert Scheitlin, GISP David
... View more
03-06-2015
11:28 AM
|
0
|
0
|
1103
|
|
POST
|
great, have fun. I'm heading to Dev... still haven't forgotten about that Collector setup either, just haven't got to it yet...
... View more
03-05-2015
03:47 PM
|
0
|
1
|
2169
|
|
POST
|
So I've bascially got an isMobile var set up to handle various tools that I want to use on the desktop or on mobile and vice versa: var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i);
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
So what I'm trying to do is get the snappingManager to be always on if moble, else set the CTRL key: var snapManager = mapMain.enableSnapping({ if(!isMobile){[ console.log("im a desktop"); alwaysSnap: true, tolerance: 5, snapPointSymbol: snapSym } else { snapKey: has("mac") ? keys.META : keys.CTRL, tolerance: 5, snapPointSymbol: snapSym } }); var layerInfos = [{ layer: lyrParcels }]; snapManager.setLayerInfos(layerInfos); Anyway, the syntax isn't quite right setting the snappingManagers' constructor paramters in an if else block. Any help is appreciated. Forgive the non-js highlighting on this part please - the editor syntax highlighter stopped beahving Thanks David
... View more
03-05-2015
03:45 PM
|
0
|
3
|
4573
|
|
POST
|
Thanks man, they're tricky aren't they? Are you going to Dev Summit next week?
... View more
03-05-2015
03:27 PM
|
0
|
3
|
2169
|
|
POST
|
actually why don't i just upload and share a simple data model as a zipped gdb to you from the geonet upload page?
... View more
03-05-2015
02:54 PM
|
0
|
1
|
1637
|
|
POST
|
Right, so that dbf has to be output as an inMemory table, it can't remain as physical dbf somewhere. I have a model that basically does a select by attribute and then a re-select by locataion. It's set up like this: the output point locations parameter is specified in the tools as in_memory\OutputPoints When I publish that result to server from the Results window it works every time becasue the output feature is an inMemory feature. I'm sure it will work the same with a dbf.
... View more
03-05-2015
02:52 PM
|
2
|
6
|
2169
|
|
POST
|
Royce, are you outputting to an inMemory feature class?
... View more
03-05-2015
01:44 PM
|
0
|
8
|
2169
|
|
POST
|
Ah, ok. Sure, I could put something up to dropbox or something?
... View more
03-05-2015
01:38 PM
|
0
|
3
|
1637
|
|
POST
|
Hi Daniel, no I am not. But that's something I will look into if the geopackage can support subtypes, domains and relates. Thanks David
... View more
03-03-2015
11:24 AM
|
0
|
5
|
1637
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-27-2026 01:27 PM | |
| 2 | 03-25-2026 06:29 AM | |
| 2 | 03-04-2026 11:14 AM | |
| 1 | 02-26-2026 09:46 AM | |
| 1 | 10-30-2025 11:25 AM |
| Online Status |
Online
|
| Date Last Visited |
5 hours ago
|