|
POST
|
Here's what I do: Setup a PointToExtent Function that allows you pass a pointer tolerance in as a parameter base on map extent width in map coordintates thus:
Function pointToExtent (mapMain, point, toleranceInPixel) {
var pixelWidth = mapMain.extent.getWidth() / mapMain.width;
var toleranceInMapCoords = toleranceInPixel * pixelWidth;
return new Extent(point.x - toleranceInMapCoords,
point.y - toleranceInMapCoords,
point.x + toleranceInMapCoords,
point.y + toleranceInMapCoords,
mapMain.spatialReference);
}
then, in on-style wiring of your feature layers' query, pass the function to the geometry property of your query, along with a tolerance setting in pixels. Keep in mind that pixel tolereances change depending on resolution and scale, so you'll have to make some adjustments. Also, Jeff Pace employes a slightly different method that is not as resolution depenedent as what I'm showing here, so I would search his posts as well-
on(lyrName, 'click', function (event) { //mapMain
var query = new Query();
query.geometry = pointToExtent(mapMain, event.mapPoint, 10);
var deferred = lyrF.selectFeatures(query, //featurelayer
FeatureLayer.SELECTION_NEW);
mapMain.infoWindow.setFeatures([deferred]);
mapMain.infoWindow.show(event.mapPoint);
});
Here, '10' is my pixel tolerance in map coords, (meters) and seems to work pretty well for line features in WebMercator
... View more
08-11-2014
03:56 PM
|
1
|
0
|
2999
|
|
POST
|
Very interesting Royce, thanks for the post. I too shall run this by my IT network and storage people to determine if we have something similar happening as well.
... View more
08-07-2014
10:18 AM
|
0
|
10
|
2461
|
|
POST
|
Hi Ian- Correct. I am still using the same method above at 10.2.2 for getting around empty caches when using HARN. Once the data frame has been given a correct transformation, whether from HARN to Standard State Plane or WGS84, then re-set back to HARN, the full caches will be created. A minor work-around really. Thanks David
... View more
07-31-2014
09:18 AM
|
0
|
1
|
1834
|
|
POST
|
Hi all- I actually have an update that disables the popup when one of the measurment tools is selected as opposed to the entire accordion pane in the html:
function disablePopup() {
if (measurement.activeTool == "area" || measurement.activeTool == "distance" || measurement.activeTool == "location"){
mapMain.setInfoWindowOnClick(false);
}
else{
mapMain.setInfoWindowOnClick(true);
}
}
lang.setObject("disablePopup", disablePopup);
the onClick call must still be set on the div pane that contains the measurement dom node. Perhaps a bit more elegant than my earlier solution of disabling popups when the entire pane has the focus, although there are certainly cases where that would be useful as well... Enjoy David
... View more
07-31-2014
09:07 AM
|
1
|
0
|
3034
|
|
POST
|
Hi All- We engineered another solution. As we are using an accordian container we simply provided an argument for the accordion div's onClick Event: <div id="accordion" data-dojo-type="dijit/layout/AccordionContainer" onclick="listenForSelectedChild();"> And then passed in the function from the js file: function listenForSelectedChild(){ if(dijit.byId('accordion').selectedChildWidget.id == "findPane"){ mapMain.setInfoWindowOnClick(false); } else { mapMain.setInfoWindowOnClick(true); } } lang.setObject("listenForSelectedChild", listenForSelectedChild); where setting the object makes the function globally avaibable to the html. In this way, whenever the selected acordion pane has the focus, the popup is disabled. Should work with any controls as well. Perhaps not as elegant as the solution in the thread Robert referred me to, but I was having trouble the dojo/aspect api. Apologies on the non-formatting, as above for Luci the 'advanced editor' doesn't seem to be available... Thanks David
... View more
07-30-2014
02:24 PM
|
1
|
2
|
3034
|
|
POST
|
Thanks Luci- not a problem. Not sure if what you have here will work for me on the dijit since it looks like what you are works with a task, but I'm going to give it a try and let you know. I know I can certainly use it on an interactive route task I have set up, where my work-around is to use a mouse-down as opposed to a click event when adding a stop or barrier graphic on my map, where mouse-down is a bit weird on touch screens Thanks- David
... View more
07-30-2014
01:34 PM
|
0
|
0
|
3034
|
|
POST
|
Thanks Robert- I hadn't worked with aspect yet, thanks for the heads up- David
... View more
07-30-2014
10:11 AM
|
0
|
1
|
3034
|
|
POST
|
Hi- Does anyone have any suggestions on how to hide the infoWindow when using the Measurement Dijit when your map contains feature layers? For example, after calling measurement.startup, you should be able to invoke the hide method for the infoWindow thusly
var measurement = new Measurement({
map: mapMain,
defaultAreaUnit: Units.SQUARE_MILES,
defaultLengthUnit: Units.MILES,
}, dom.byId("measurementDiv"));
measurement.startup();
mapMain.infoWindow.hide();
I am certain I am missing something, but just can't find it. The problem is that if a feature layer is visible, I'm just not able to hide the info window when making a measurement (i.e I just can't get the syntax correct). All suggestions are welcome- Thanks- David
... View more
07-29-2014
03:25 PM
|
0
|
9
|
3831
|
|
POST
|
Hello, is are the jsapi picture symbols still located at: http://static.arcgis.com/images/Symbols/ Url keeps coming up blank on my end- Thanks David
... View more
07-29-2014
11:50 AM
|
0
|
2
|
1291
|
|
POST
|
A small update: The Recreate_All_Tiles option worked again last week (repeatedly using my python IDLE) on our stand-alone development server, but continues to fail with the same frequency and 'error moving bundle file' error in our distributed three-machine, 2 cluster production environment where our shares, directories and stores are stored on our 1Gig Lan connected file server. It would be really, really great if ESRI could comment. David
... View more
07-28-2014
09:47 AM
|
1
|
0
|
2568
|
|
POST
|
You could try setting up a shutdown in your licence manager for all desktop products. We use FlexLM and it does just that. And to your earlier question, no I don't always have to stop services, only if a schema lock is set to true. And yes, you will have to overwrite or restart the map service depending on the nature of the change.
... View more
07-25-2014
10:20 AM
|
0
|
0
|
4710
|
|
POST
|
Yes, if anyone could actaully tell us what tools and/or scripts are used to generate the Summarize Within or Summarize Nearby GP services that would be very helpful. Unfortunately, there does not seem to be any help in this regard in either the REST or JavaScript APIs. As an analyst, I can certainly produce summary statistics on the desktop using a variety of methods and tools. But that in no way helps us to construct the same GP service in our own Advanced-licenced Server environment which would allow us to create our own jobs. Thanks David
... View more
07-25-2014
10:09 AM
|
0
|
0
|
1885
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 4 weeks ago | |
| 6 | 4 weeks ago | |
| 1 | 06-17-2026 06:04 AM | |
| 1 | 06-08-2026 08:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
Monday
|