|
POST
|
Hi Derek, It is really difficult to offset the searched point to left or right of the street. And there is no out of the box functionality like that. However, as Josh suggested you are able to use onSearchResults event to modify the geometry of the located point. You Turn the autoNavigate and tweak the resulting geometry something like following then set extent as needed. s.on("search-results", function (evt){
console.log("x Coordinate is : " + evt.results[0][0].feature.geometry.x + " Y Coordinate is : " + evt.results[0][0].feature.geometry.y);
evt.results[0][0].feature.geometry.x = evt.results[0][0].feature.geometry.x + 10000;// Tweak the geomery here.
evt.results[0][0].feature.geometry.y = evt.results[0][0].feature.geometry.y + 10000;
console.log("NEW x Coordinate is : " + evt.results[0][0].feature.geometry.x + " NEW Y Coordinate is : " + evt.results[0][0].feature.geometry.y);
}); Let me know if this helps. Thanks, Akshay Harshe Esri Technical Support.
... View more
07-07-2015
09:45 AM
|
1
|
4
|
1197
|
|
POST
|
If the application loads and data doesn't show up and you know you haven't touched the code, may be check if all your services are working directly at the REST endpoint and your application has access to it. This can be a potential security issue. Do you have any other error on the console in developer tools?
... View more
05-22-2015
08:30 AM
|
0
|
0
|
2185
|
|
POST
|
You are welcome Chris. Let me know if you have any questions.
... View more
05-22-2015
08:24 AM
|
0
|
0
|
1213
|
|
POST
|
Hi, Few things to remember When you write esriConfig.defaults.io.proxyUrl = "http://YourDOMAINName/proxy/proxy.ashx"; make sure you use the domain name from you are using the application to access your proxy. If you write "localhost" then make sure you access your application via "localhost". Also, there was some programmatic error in the code that I Fixed please see the file attached. Make sure you configure your proxy.config file correctly.(with Username and password for the referenced urls). I am assuming that you know credentials to access THIS content or the content you are using. If you haven't had a chance to configure your proxy then please follow instructions on our blog: Setting up a Proxy | Support Services Blog See the attached modified code. I haven't gone through the entire code but it not just gives Token required error. If this isn't the issue, let me know how I can repro this. Thanks, Akshay
... View more
05-21-2015
04:14 PM
|
1
|
2
|
1213
|
|
POST
|
Hi, I am not sure why this would happen. Is there any sample or application I can test with? Thanks, Akshay
... View more
05-21-2015
03:11 PM
|
0
|
0
|
2185
|
|
POST
|
Are you logged in to the same browser window somewhere else?
... View more
05-13-2015
08:47 AM
|
0
|
2
|
972
|
|
POST
|
Sorry, Which image after screen 3? I can see just 3 images Screen 1,2 and 3.
... View more
05-12-2015
09:25 AM
|
0
|
4
|
972
|
|
POST
|
Hi shafi trumboo, Thanks for reaching out. Correct me if I am wrong but you want to know why your application asks you to log in or /approve the user id you are using when you are already logged in to ArcGIS online? And by that you mean it is a second prompt for you to log in to the same account.
... View more
05-11-2015
05:23 PM
|
0
|
6
|
2139
|
|
POST
|
Hi Andrew, Thanks for bringing that to our attention and thanks Ken for providing a workaround. I have submitted a bug against this and added suggested workaround. I hope this will get fixed soon. Here is the bug# for your reference BUG-000086608 Reorder layers in map service sample works incorrectly when all layers are turned off. Please find the attached sample. Thanks Akshay
... View more
04-02-2015
12:56 PM
|
0
|
0
|
1103
|
|
POST
|
Hi Subbu, I am not sure if you have had a look at bookmarks widget. let me know if following sample works for you Store bookmarks client side | ArcGIS API for JavaScript Thanks, Akshay H
... View more
01-15-2015
04:20 PM
|
0
|
0
|
424
|
|
POST
|
Hi Usha, If you are using Using the attribute inspector | ArcGIS API for JavaScript sample from the api and you are not able to get rid of the scroll bar use the following code in your css. .esriPopup .contentPane { height: 180px; } If you want to construct a div on infowindow see if dom-construct can help dojo/dom-construct — The Dojo Toolkit - Reference Guide Thanks, Akshay Harshe
... View more
01-15-2015
04:14 PM
|
0
|
0
|
390
|
|
POST
|
Jeff Pace, I agree the wordings in the documentation are confusing but I am certain that if you want to center at the point a then you would have to use map.centerAt(). you can double click and zoom without adding any functionality. To tackle the problem of Zooming and centering while Draw-end, measure-end you can partially implement the logic that Rene Rubalcava has suggested (as he mentioned about the time out, I assume the value is 100 millisecond). Since that might not fully work if you manage to double click within a second (unlikely). But in any case you need to add that double click event and center at back again when you are done with the measure operation. Which i why I think it is a good idea to use event like "measure-start" and "measure-end" e.g
dblclick = map.on("dbl-click",function(evt){
map.centerAt(evt.mapPoint);
console.log(evt.mapPoint)
});
measurement.on("measure-start", function(){
dblclick.remove();
console.log("Event removed");
});
measurement.on("measure-end", function(){
dblclick = map.on("dbl-click",function(evt){
map.centerAt(evt.mapPoint);
console.log(evt.mapPoint);
console.log("Event Started Again");
});
Please have a look at following measure sample and what happens to the dblclick variable you would reference your proxy url to this sample. See if that helps Thanks, Akshay <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Measure Tool</title> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html,body { height:100%; width:100%; margin:0; } body { background-color:#FFF; overflow:hidden; font-family:"Trebuchet MS"; } #map { border:solid 2px #808775; -moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; margin:5px; padding:0px; } #titlePane{ width:240px; } .claro .dijitTitlePaneTitle { background: #fff; font-weight:600; border: none; border-bottom:solid 1px #29201A; border-top:solid 1px #29201A; } .claro .dijitTitlePaneTitleHover { background:#eee; } .claro .dijitTitlePaneTitleActive { background:#808775; } .claro .dijitTitlePaneContentOuter { border-right: none; border-bottom: none; border-left: none; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var map; var dblclick; require([ "dojo/dom", "esri/Color", "dojo/keys", "dojo/parser", "esri/config", "esri/sniff", "esri/map", "esri/SnappingManager", "esri/dijit/Measurement", "esri/layers/FeatureLayer", "esri/renderers/SimpleRenderer", "esri/tasks/GeometryService", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/dijit/Scalebar", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/TitlePane", "dijit/form/CheckBox", "dojo/domReady!" ], function( dom, Color, keys, parser, esriConfig, has, Map, SnappingManager, Measurement, FeatureLayer, SimpleRenderer, GeometryService, SimpleLineSymbol, SimpleFillSymbol ) { parser.parse(); //This sample may require a proxy page to handle communications with the ArcGIS Server services. You will need to //replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic //for details on setting up a proxy page. esriConfig.defaults.io.proxyUrl = "/proxy"; esriConfig.defaults.io.alwaysUseProxy = false; //This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications esriConfig.defaults.geometryService = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); map = new Map("map", { basemap: "satellite", center: [-85.743, 38.256], zoom: 17 }); dblclick = map.on("dbl-click",function(evt){ map.centerAt(evt.mapPoint); console.log(evt.mapPoint) }); var sfs = new SimpleFillSymbol( "solid", new SimpleLineSymbol("solid", new Color([195, 176, 23]), 2), null ); var parcelsLayer = new FeatureLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"] }); parcelsLayer.setRenderer(new SimpleRenderer(sfs)); map.addLayers([parcelsLayer]); //dojo.keys.copyKey maps to CTRL on windows and Cmd on Mac., but has wrong code for Chrome on Mac var snapManager = map.enableSnapping({ snapKey: has("mac") ? keys.META : keys.CTRL }); var layerInfos = [{ layer: parcelsLayer }]; snapManager.setLayerInfos(layerInfos); var measurement = new Measurement({ map: map }, dom.byId("measurementDiv")); measurement.on("measure-start", function(){ dblclick.remove(); console.log("Event removed"); }); measurement.on("measure-end", function(){ dblclick = map.on("dbl-click",function(evt){ map.centerAt(evt.mapPoint); console.log(evt.mapPoint); console.log("Event Started Again"); }); }); measurement.startup(); }); </script> </head> <body class="claro"> <div id="mainWindow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline',gutters:false" style="width:100%; height:100%;"> <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"> <div style="position:absolute; right:20px; top:10px; z-Index:999;"> <div id="titlePane" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Measurement', closable:'false', open:'false'"> <div id="measurementDiv"></div> <span style="font-size:smaller;padding:5px 5px;">Press <b>CTRL</b> to enable snapping.</span> </div> </div> </div> </div> </body> </html>
... View more
11-13-2014
05:31 PM
|
1
|
0
|
2290
|
|
POST
|
Unfortunately, There isn't a direct sample that will demonstrate M:M relationships. But since you can have multiple related tables to one service this looks like it can be doable. What is exactly your workflow? If you can even explain in simple terms what functionality you want to achieve, I will try my best to help you with that. Thanks Akshay
... View more
11-11-2014
05:28 PM
|
1
|
0
|
852
|
|
POST
|
Hi Olivia, I was just trying to research this looks like you have following options: To view all the customizable widget strings view any of the samples in a browser with debugging tools open and type console.dir(esri.bundle) in the console. Tim Witt is partly correct you can access the element and apply the tool tip. Here is a hack that I did in the code it uses on(document.getElementById("dijit_form_Button_2_label"), "click", function(){ esri.bundle.toolbars.draw.freehand = "Click to start drawing a search line" }); FOR THE FULL CODE USE FOLLOWING as SAMPLE: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width,user-scalable=no"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Maps Toolbar</title> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/nihilo/nihilo.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mainWindow { font-family: sans-serif; height: 100%; width: 100%; } html, body { margin: 0; padding: 0; } #header { height: 80px; overflow: auto; padding: 0.5em; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var map, toolbar, symbol, geomTask; require([ "esri/map", "esri/toolbars/draw", "esri/graphic", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "dojo/parser", "dijit/registry", "dojo/on", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/form/Button", "dijit/WidgetSet", "dojo/domReady!" ], function( Map, Draw, Graphic, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, parser, registry, on ) { parser.parse(); map = new Map("map", { basemap: "streets", center: [-15.469, 36.428], zoom: 3 }); map.on("load", createToolbar); // loop through all dijits, connect onClick event // listeners for buttons to activate drawing tools registry.forEach(function(d) { // d is a reference to a dijit // could be a layout container or a button if ( d.declaredClass === "dijit.form.Button" ) { d.on("click", activateTool); } }); on(document.getElementById("dijit_form_Button_2_label"), "click", function(){ esri.bundle.toolbars.draw.freehand = "Click to start drawing a search line" }); function activateTool() { var tool = this.label.toUpperCase().replace(/ /g, "_"); toolbar.activate(Draw[tool]); map.hideZoomSlider(); } function createToolbar(themap) { toolbar = new Draw(map); toolbar.on("draw-end", addToMap); } function addToMap(evt) { var symbol; toolbar.deactivate(); map.showZoomSlider(); switch (evt.geometry.type) { case "point": case "multipoint": symbol = new SimpleMarkerSymbol(); break; case "polyline": symbol = new SimpleLineSymbol(); break; default: symbol = new SimpleFillSymbol(); break; } var graphic = new Graphic(evt.geometry, symbol); map.graphics.add(graphic); } }); </script> </head> <body class="nihilo"> <div id="mainWindow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'"> <div id="header" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> <span>Draw:<br /></span> <button data-dojo-type="dijit/form/Button">Point</button> <button data-dojo-type="dijit/form/Button">Multi Point</button> <button data-dojo-type="dijit/form/Button">Line</button> <button data-dojo-type="dijit/form/Button">Polyline</button> <button data-dojo-type="dijit/form/Button">Polygon</button> <button data-dojo-type="dijit/form/Button">Freehand Polyline</button> <button data-dojo-type="dijit/form/Button">Freehand Polygon</button> <!--The Arrow,Triangle,Circle and Ellipse types all draw with the polygon symbol--> <button data-dojo-type="dijit/form/Button">Arrow</button> <button data-dojo-type="dijit/form/Button">Triangle</button> <button data-dojo-type="dijit/form/Button">Circle</button> <button data-dojo-type="dijit/form/Button">Ellipse</button> </div> <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"></div> </div> </body> </html> Hope that helps Akshay Harshe Esri Technical Support
... View more
11-11-2014
05:11 PM
|
1
|
0
|
2039
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | a month ago | |
| 4 | 12-10-2025 01:53 PM | |
| 3 | 11-06-2025 01:31 PM | |
| 1 | 11-05-2025 02:55 PM | |
| 1 | 10-30-2025 10:32 AM |
| Online Status |
Offline
|
| Date Last Visited |
Friday
|