|
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
|
3198
|
|
POST
|
Are you logged in to the same browser window somewhere else?
... View more
05-13-2015
08:47 AM
|
0
|
2
|
1265
|
|
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
|
1265
|
|
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
|
2683
|
|
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
|
1499
|
|
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
|
676
|
|
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
|
584
|
|
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
|
3339
|
|
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
|
1287
|
|
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
|
2468
|
|
POST
|
Hi Jeff, By default, the double-click zoom is enabled on any map. Well if you are looking for it to center the map at the point you clicked then it is not something you are looking for. There is no best way to explain this but enableDoubleClickZoom() property suggests "Permits users to double click on a map to zoom in a level and center the map." In this sense the map centers itself according to position of you mouse pointer. For example, If you are willing to zoom to Stockholm and you double-click on Stockholm, the position of the point you have double-clicked holds at the exact same spot where your mouse pointer is and the map center is adjusted accordingly.( In other words, it keeps the point you have double click in the browser window). Imagine if you have clicked the Plus and minus button for zooming in which is not related to your mouse pointer and zooms in directly at the center of screen, In this case, if you are looking at Stockholm then that is out of your map window. I hope that explains the center the map. If you are looking for centering the point that you have clicked then you will need to implement the map.centerAt(evt.mapPoint) property which will give you the desired effect. You would just implement the following lines of code. map.on("dbl-click",function(evt){ map.centerAt(evt.mapPoint); //console.log(evt.mapPoint) }); See if that answers your question. Thanks, Akshay Harshe Esri Technical Support
... View more
11-11-2014
03:03 PM
|
0
|
3
|
3339
|
|
POST
|
Hi Adriana, I am not sure if you have had a chance to look at following sample: Query and edit related records | ArcGIS API for JavaScript See if this is something you are looking for. The sample uses one feature layer and saves multiple records for layer when you hit like button in InfoWindow. This looks like has one to many relationship. I am not sure what is your use case. Thanks Akshay Harshe Esri Technical Support
... View more
11-11-2014
01:32 PM
|
1
|
2
|
1287
|
|
POST
|
Hi Gauri, Have a look at this sample regarding Feature Collections if you haven't already have. If your response is in Feature Collection then you can create a feature layer from that. Not sure if you can make graphics layer out of that! See if this helps in any way. Thanks, Akshay H.
... View more
07-22-2014
04:49 PM
|
2
|
1
|
784
|
|
POST
|
Hi Matthew, I am wondering if you want to create both layers on the map once by clicking Male radio button and Female radio button? Depending on the functionality you want you can use one of the following. Option 1: If adding only one layer on button click works for you then: You can just disable the Create Map button using document.getElementById("myBtn").disabled=true; after you complete writing your IF statements inside funcall(); This way you don't need to worry about another layer getting added and you can keep your setup as is. Option 2: If you need functionality of deleting multiple layers using delete button. You may want to check following property of Map: map.layerIds (please click) Inside your funcalldel() you can try writing this logic: Since the create map will add will be on the top position you can get map.layerIds.length and store that in a variable (which will be layer you just added). Then you can use map.removeLayer(layer[id]) Or you can even do this : var layer = map.getLayer(map.layerIds[id]); map.removeLayer(layer); See if this works! Thanks Akshay H
... View more
07-18-2014
05:27 PM
|
1
|
0
|
3866
|
|
POST
|
Thats perfect Hani! You will need a proxy for securing the app login. I think you are on a right Track!! :cool: Akshay
... View more
04-21-2014
08:16 AM
|
0
|
0
|
1222
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | a week ago | |
| 1 | a week ago | |
| 1 | 2 weeks ago | |
| 3 | 2 weeks ago | |
| 5 | 2 weeks ago |
| Online Status |
Offline
|
| Date Last Visited |
Thursday
|