|
POST
|
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 I'm not 100% sure what you are saying here. Just to be clear: you are saying that disableMapNavigation() does not respect touch events, and touch events still move the map even after calling disableMapNavigation()? 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? Is there something from the double-click event itself that you need that you cannot get from the double-tap event? Otherwise, you could use something like aspect.after but that may be overly complicated for your use-case.
... View more
06-26-2014
03:13 PM
|
0
|
0
|
1447
|
|
POST
|
that is the exact code that i want to use, that doesn't work, that i was hoping jon could check on. I'll look into that. In the meantime, see if the following workaround is suitable:
on(map.container, tap, function(e){
if(e.target.e_graphic){
console.log("tapped graphic");
}
});
Although it doesn't specifically target the feature layer, this will return a graphic from the feature layer. This may or may not be helpful for your use-case.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Hello World</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<script src="http://js.arcgis.com/3.9/"></script>
<style type="text/css">
html, body, #map {
padding: 0;
margin: 0;
height: 100%;
}
</style>
<script>
require([
"dojo/on",
"dojo/ready",
"esri/map",
"dojox/gesture/tap",
"esri/layers/FeatureLayer"
], function(
on,
ready,
Map,
tap,
FeatureLayer
) {
ready(function(){
map = new Map("map", {
basemap: "topo",
center: [-117.198, 34.049],
zoom: 14
});
// Map Load
on(map, "load", function(){
var ambulanceLayer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/RedlandsEmergencyVehicles/FeatureServer/0", {
mode: FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
map.addLayers([ambulanceLayer]);
on(map.container, tap, function(e){
if(e.target.e_graphic){
console.log("tap a graphic: ", e.target.e_graphic);
}
});
on(map.container, tap.hold, function(e){
if(e.target.e_graphic){
console.log("tap.hold on a graphic: ", e.target.e_graphic);
}
});
on(map.container, tap, function(e){
if(e.target.e_graphic){
console.log("double tap a graphic: ", e.target.e_graphic);
}
});
//on(map.container, tap.hold, function(e){console.log("tap.hold");});
//on(map.container, tap.doubletap, function(e){console.log("tap.doubletap");});
});
});
});
</script>
</head>
<body class="claro"></body>
</html>
... View more
06-26-2014
10:43 AM
|
0
|
0
|
1447
|
|
POST
|
Unfortunately, the AttributeInspector widget does not currently support time by default. However, it has been updated for the next release (due out before the UC).
... View more
06-26-2014
08:32 AM
|
0
|
0
|
1244
|
|
POST
|
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?
... View more
06-25-2014
08:20 AM
|
0
|
0
|
2305
|
|
POST
|
I think this thread should have died right here. Instead, you folks keep discussing how to violate license terms. SMH. 4.2 (h) seems to be the appropriate section in the linked version of the agreement. Must have been updated since Erwin posted. Right, but you must have missed this point: 4.1c: Licensee may customize Software using any (i) macro or scripting language, (ii) published application programming interface (API), or (iii) source or object code libraries, but only to the extent that such customization is described in Documentation. The ability to hide the logo is well described in our documentation. There are certain use-cases that require hiding the map-based ESRI logo when screen-space is an issue. They hide the map logo while showing the ESRI logo elsewhere in their application. Another use case is replacing the default ESRI logo with a smaller ESRI logo. Remember, we are developers, not lawyers. Mike, I do appreciate your input.
... View more
06-25-2014
08:16 AM
|
1
|
2
|
1262
|
|
POST
|
It looks like your generateFeatureCollection() function is outside of your require scope so dom is undefined, as the error states. From our very first tutorial: The global require() function (provided by Dojo) is used to load modules. Esri's JavaScript API is built on top of Dojo and relies on Dojo for its module system and other features like vector graphics and localization as well as a way to abstract away browser differences. For more information on the relationship between Dojo and the JavaScript API, see Working with Dojo and Why Dojo. https://developers.arcgis.com/javascript/jstutorials/intro_firstmap_amd.html You will want to read this documentation: https://developers.arcgis.com/javascript/jshelp/inside_dojo.html
... View more
06-24-2014
12:47 PM
|
0
|
0
|
1199
|
|
POST
|
The id of your grid is "undefined_grid" because NCDM is not defined within your queryResultsHandler_toGrid() function. This creates numerous issues when trying to interact with your grid (set up events, resize, etc). You'll definitely want to change that... as well as potentially rethink your application's workflow to better manage its components and modules. The issue can be solved by resizing your gridContainer (and potentially your grid) when they are shown. Two changes need to be made to your current code to produce the desired result. 1) I added one line to the very bottom of your queryResultsHandler_toGrid(evt) function: return grid; This change was made so I have direct access to the grid's object representation (widget/class). I would rewrite this part of your application... you might want a function specifically for grid generation, which would return the grid object to an easy-to-access variable in your require scope. 2) Resizing on callback: Line 223: currentQTask.on('complete', function(evt){ var grid = queryResultsHandler_toGrid(evt); grid.resize(); registry.byId("gridContainer").resize(); }); NOTE: I removed almost all of your generic dgrid CSS (not cell or row) as it was causing issues with DOJO's automatic resizing.
... View more
06-24-2014
12:37 PM
|
0
|
0
|
732
|
|
POST
|
I don't see a div with an id of "upload-status" in your HTML.
... View more
06-24-2014
11:40 AM
|
0
|
0
|
1199
|
|
POST
|
Honestly, the best way to go about replacing the logo is via CSS like Odoe suggests. We are over-complicating the issue by bringing javascript into this when your use-case doesn't require us to. Basically, the above code is fine but you will need to tweak your CSS selector to specifically target the correct node containing the logo. I started with: .logo-med {
background-image: url('myLogo.png') !important;
height: 50px;
width: 100px;
}
This should change the logo without any issue. However, we want to be more specific in case the class 'logo-med' is used elsewhere.. I see you named gave your map an id of "mapDiv" so lets go ahead and use that too:
#mapDiv .logo-med {
background-image: url('myLogo.png') !important;
height: 50px;
width: 100px;
}
Lastly, remove the jQuery append code.
... View more
06-20-2014
11:20 AM
|
0
|
0
|
1880
|
|
POST
|
I think getEditSummary() only returns the very last operation performed. https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#geteditsummary Just to be clear: you are seeking a method to expose the full history of edits?
... View more
06-20-2014
10:12 AM
|
0
|
0
|
6442
|
|
POST
|
Hi odoe, I'm still a beginner at JavaScript. Can you explain what you mean by "I append a div to the "map_root" element"? Odoe creates a new div and pushes it inside another div (called "map_root") using pure javascript. A div is simply an element (or dom node) in your site's DOM (Document Object Model). I would strongly recommend reading about HTML, CSS and the DOM before jumping into Javascript. They are so tightly integrated that you must be faimilar with the basics of HTML and the DOM to be effective at javascript development.
... View more
06-20-2014
10:04 AM
|
0
|
0
|
1880
|
|
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.
... View more
06-20-2014
09:55 AM
|
0
|
0
|
2305
|
|
POST
|
Hello and thanks for posting! 400px is the default size of the map container. When the map fails to resize to fit its container, it is usually because the developer accidentally skipped a necessary step. The map div itself should be set to width: 100%, height: 100%. The map div should probably be inside a DOJO ContentPane to aid in automatic resizing. If you are not using a DOJO template with BorderContainers and ContentPanes, ignore this step. A few questions: Have you tried to resize the map programmatically after the page is loaded? Have you confirmed that your HTML is correctly formed and that DOJO is correctly parsing the app layout? Did you use this specific tutorial? http://esri.github.io/bootstrap-map-js/demo/index.html
... View more
06-20-2014
09:52 AM
|
1
|
0
|
6674
|
|
POST
|
No problem! Feel free to make a new thread any time you have an issue. While we don't have time to answer every single thread, I personally try to answer questions that are well-written and organized. Also, attaching code is always appreciated 😄
... View more
06-18-2014
12:45 PM
|
0
|
0
|
1471
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-26-2014 09:56 AM | |
| 1 | 09-18-2014 11:50 AM | |
| 1 | 09-19-2014 11:28 AM | |
| 1 | 07-09-2014 01:43 PM | |
| 1 | 07-09-2014 02:05 PM |
| Online Status |
Offline
|
| Date Last Visited |
08-14-2024
05:31 PM
|