POST
|
thanks for your reply . but it seems nobody understand my problem. all these examples shows manual adding of images in infotemplate. my problem is this i have to add image in attribute table then show that image in infotemplate along with attributes of the feature layer
... View more
06-10-2020
11:10 PM
|
0
|
1
|
481
|
POST
|
how we display image in info template from attribute table of the feature layer?
... View more
06-09-2020
10:39 PM
|
0
|
3
|
481
|
POST
|
I have added image in attribute table. It looks like this: Now I want to display this image into infotemplate. so far I am doing like this: var content = "<b>Name</b>: ${name}" + "<br><b>Picture</b>: ${Pic}" + "<br><b>Last Name</b>: ${lname}" ; var infoTemplate = new InfoTemplate("${FIELD_NAME}", content); But it does not display image. It is empty. image is showing in identity window in ArcGis. but not in infotemplate
... View more
06-08-2020
10:43 PM
|
0
|
6
|
565
|
POST
|
it returns this when i put query in the query form of layer { "displayFieldName": "Id", "fieldAliases": { "Soil": "Soil" }, "fields": [ { "name": "Soil", "type": "esriFieldTypeString", "alias": "Soil ", "length": 50 } ], "features": [ { "attributes": { "Soil": "Soil Map" } }, { "attributes": { "Soil": "Soil Map" } }, { "attributes": { "Soil": "Soil Map" } } ] }
... View more
08-08-2017
02:25 AM
|
0
|
1
|
504
|
POST
|
{"displayFieldName":"Id","fieldAliases":{"Soil":"Soil"},"fields":[{"name":"Soil","type":"esriFieldTypeString","alias":"Soil","length":50}],"features":[]} it returns this.
... View more
08-06-2017
08:33 PM
|
0
|
3
|
504
|
POST
|
i am encountering problem with query i have to select three shapfile under one name as one unique value. it worked in arcmap but it does not work with arcgis javascrip api. my query is esriRequest({
url: "http://localhost:6080/arcgis/rest/services/........./query?where=Name ='" + id.toString() + "'&outFields=Soil&returnGeometry=false&orderByFields=Soil&returnDistinctValues= true&f=json",
content: {
f: 'json'
},
handleAs: 'json',
callbackParamName: 'callback',
timeout: 15000
}).then(lang.hitch(this, function(response) {
var store2 = new Memory({
data: []
}); but in coding when i have applied query it populate combobox like this in below image could anyone tell me what i am doing wrong?
... View more
08-04-2017
12:40 AM
|
0
|
5
|
722
|
POST
|
Thanks sir, i know u cannot do more. Actually your are not gettting my problem. Anyhow thanks alot. Sent from my Samsung device
... View more
08-03-2017
09:02 AM
|
0
|
1
|
278
|
POST
|
Thanks sir, but u have added only register.by id only and this is not the issuse. Because i have edited my combo n layer names for the forum. But the problem i categorize my shapefile and then publish it. So it gives three feature with same name. But i want it gives only one name like we did in arcmap , selection by attribute feature. Sent from my Samsung device
... View more
08-03-2017
08:30 AM
|
0
|
3
|
278
|
POST
|
sir if we add another forexample temperature. then can we extract particular temp i.e of one city. and display in the legend?
... View more
08-03-2017
03:03 AM
|
0
|
0
|
447
|
POST
|
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" /> <title>Soil Suitability Module</title> <!-- <link rel="stylesheet" type="text/css" href="Wstyle.css"> --> <link rel="stylesheet" href="http://js.arcgis.com/3.20/dijit/themes/tundra/tundra.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.20/dojo/resources/dojo.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.20/esri/css/esri.css"> <!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css"> --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.js"></script> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <!--<script src="js/form.js"></script> --> <script src="http://js.arcgis.com/3.20/"></script> <style> html,body,#map, #mainWindow { height: 100%; width: 100%; margin: 0; <!-- padding: 0; --> } body { background-color: #FFF; overflow: hidden; font-family: "Baskerville Old Face"; font-size : 10.8pt; } #BasemapToggle { position: absolute; top: 10px; right: 10px; z-index: 30; } #HomeButton { position: absolute; top: 95px; left: 20px; z-index: 50; } </style> <script> //declaring variables globally var map; var layer1; var S_layer; var layer; var layers = []; var thePoly, theExtent; require([ "esri/map", "esri/dijit/OverviewMap", "esri/dijit/BasemapToggle", "esri/dijit/HomeButton", "dojo/on", "dojo/dom-style", "esri/tasks/query", "esri/domUtils", "dijit/registry", "esri/layers/FeatureLayer", "esri/InfoTemplate", "esri/symbols/SimpleFillSymbol", "esri/Color", "esri/dijit/Popup", "esri/dijit/PopupTemplate", "dojo/store/Memory", "dojo/_base/array", "dojo/_base/lang", "esri/request", "dojo/json", "esri/graphic", "dojo/parser", "esri/dijit/Scalebar", "dojox/charting/Chart", "dojox/charting/themes/Dollar", "esri/dijit/Legend", "dijit/layout/BorderContainer", "dijit/layout/AccordionContainer", "dijit/layout/AccordionPane", "dijit/layout/ContentPane", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/dijit/PopupTemplate", "dijit/form/ComboBox", "dijit/form/TextBox", "esri/Color", "esri/config", "esri/symbols/PictureMarkerSymbol", "esri/symbols/SimpleFillSymbol", "dojo/on", "dojo/dom-class", "dojo/dom-construct", "dojo/dom", "dojo/domReady!" ], function ( Map, OverviewMap, BasemapToggle, HomeButton, on, domStyle, Query, domUtils, registry, FeatureLayer, InfoTemplate, SimpleFillSymbol,Color,Popup, PopupTemplate, Memory, array, lang, esriRequest, json, Graphic, parser, Scalebar,Chart, theme, Legend,TextBox, Color, esriConfig, PictureMarkerSymbol, SimpleLineSymbol,PopupTemplate,SimpleFillSymbol, on, domClass, domConstruct,dom ) { parser.parse(); map = new Map("map", { basemap: "hybrid", center: [69.3451, 30.3753],//Longitude and Latitude zoom:6 , }); //adding map var toggle = new BasemapToggle({ map: map, basemap: "topo" }, "BasemapToggle"); toggle.startup(); //adding home button var home = new HomeButton({ map: map }, "HomeButton"); home.startup(); // adding overview window var overviewMap = new esri.dijit.OverviewMap({ map: map , basemap: "hybrid" },dojo.byId("overviewDiv")); overviewMap.startup(); layer1 = new FeatureLayer("http://localhost:6080/arcgis/rest/services/.................../MapServer/7", { mode: FeatureLayer.MODE_SELECTION, outFields: ["*"] }); S_layer = new FeatureLayer("http://localhost:6080/.........................../0",{ mode: FeatureLayer.MODE_SELECTION, outFields: ["*"] }); //adding legend //legend.startup(); //adding scalebar var scale = new Scalebar({ map: map, scalebarUnit: "metric" }); map.addLayers([layer1,S_layer]); dijit.byId("c1").attr('readonly', true); dijit.byId("RSoil").attr('readonly', true); // zoom to layer function app = { zoomRow: function(id, which){ //clearing previous layers for next layer layer1.clearSelection(); S_layer.clearSelection(); //populating name esriRequest({ url: "http://localhost:6080/arcgis/rest/services/................../querywhere=1%3D1&outFields=Name&returnGeometry=false&orderByFields=Name&returnDistinctValues=true&f=json", content:{ f:'json' }, handleAs:'json', callbackParamName:'callback', timeout:15000 }).then(lang.hitch(this,function(response){ var store2 = new Memory({data:[]}); dijit.byId("c1").set('store',store2); var data = array.map(response.features,lang.hitch(this,function(feat, index){ var name = feat.attributes.Name; var dataItem = { id:index, name:name }; return dataItem; })); store2 = new Memory({data:data}); dijit.byId("c1").set('store',store2); document.getElementById('c1').value = ""; })); } else if(which == "cd"){ var cd1= (id).toString(); cd1= cd.replace(cd", ""); query.where = "Name='" + cd1 + "'"; console.info(query.where); query.returnGeometry = true; layer1.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (features) { if(features[0]){ thePoly = features[0].geometry; theExtent = thePoly.getExtent().expand(2); //Zoom out slightly from the polygon's extent map.setExtent(theExtent); } }); esriRequest({ url: "http://localhost:6080/arcgis/rest/services/........./query?where=Name ='" + id.toString() + "'&outFields=Soil&returnGeometry=false&orderByFields=Soil&returnDistinctValues= true&f=json", content:{ f:'json' }, handleAs:'json', callbackParamName:'callback', timeout:15000 }).then(lang.hitch(this,function(response){ var store2 = new Memory({data:[]}); dijit.byId("RSoil").set('store',store2); var data = array.map(response.features,lang.hitch(this,function(feat, index){ var name = feat.attributes.Soil; var dataItem = { id:index, name:name }; return dataItem; })); store2 = new Memory({data:data}); dijit.byId("RSoil").set('store',store2); document.getElementById('RSoil').value = "Soil"; })); } else if(which == "RS"){ var rs = (id).toString(); rs = rs.replace("RS", ""); query.where = "Soil='" + rs + "'"; console.info(query.where); query.returnGeometry = true; S_layer.selectFeatures(query, FeatureLayer.SELECTION_NEW, function (features) { if(features[0]){ thePoly = features[0].geometry; theExtent = thePoly.getExtent().expand(1.8); //Zoom out slightly from the polygon's extent map.setExtent(theExtent); } }); } } }; }); </script> </head> <body class="tundra"> <div id="details" data-dojo-type="dijit.layout.ContentPane" class="roundedCorners" data-dojo-props="region:'left', splitter:false" style="overflow:auto; width:250px; background-color: white ;border:solid thin white"> <div data-dojo-type="dijit/layout/AccordionContainer" class="roundedCorners" style="height 200px";> <div data-dojo-type="dijit/layout/ContentPane" class="roundedCorners" title="Area Selection"; selected="true"> <span><b>1. Parameters of Selection</b> </span><br></br> <input id="c1" class = "Drop" data-dojo-type="dijit/form/ComboBox" value="" onchange="app.zoomRow(document.getElementById('c1').value, 'cd);" style="overflow:auto; width:235px ; " /> <br> <input type="hidden" name="stateabbr" id="stateabbr" /> <span><b>2.Soil/Temperature/Elevetaion Map</b> </span><br></br> <input maxlength = "1" id="RSoil" class = "Drop" data-dojo-type="dijit/form/ComboBox" value="Soil" onchange="app.zoomRow(document.getElementById('RSoil).value, 'RS');"style="overflow:auto; width:235px ; " /> <br> </div> <div data-dojo-type="dijit/layout/ContentPane" title="...." > </div> <div data-dojo-type="dijit/layout/ContentPane" title="...." > </div> </div> </div> <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" style="overflow:hidden;"> <div id="BasemapToggle"></div> <div id="HomeButton"></div> <div id = "infoDiv"> <div id = "legendDiv"></div> </div> <body > </html>
... View more
08-03-2017
03:00 AM
|
0
|
5
|
678
|
POST
|
</head> <body class="tundra"> <div id="details" data-dojo-type="dijit.layout.ContentPane" class="roundedCorners" data-dojo-props="region:'left', splitter:false" style="overflow:auto; width:250px; background-color: white ;border:solid thin white"> <div data-dojo-type="dijit/layout/AccordionContainer" class="roundedCorners" style="height 200px";> <div data-dojo-type="dijit/layout/ContentPane" class="roundedCorners" title="Area Selection"; selected="true"> <span><b>1. Parameters of Selection</b> </span><br></br> <input id="c1" class = "Drop" data-dojo-type="dijit/form/ComboBox" value="" onchange="app.zoomRow(document.getElementById('c1').value, 'cd);" style="overflow:auto; width:235px ; " /> <br></br> <input id="c2" class = "Drop" data-dojo-type="dijit/form/ComboBox" value="" onchange="app.zoomRow(document.getElementById('c2').value, 'cd2');" style="overflow:auto; width:235px;"/><br></br> <input type="hidden" name="stateabbr" id="stateabbr" /> <span><b>2.Soil/Temperature/Elevetaion Map</b> </span><br></br> <input maxlength = "1" id="RSoil" class = "Drop" data-dojo-type="dijit/form/ComboBox" value="Soil" onchange="app.zoomRow(document.getElementById('RSoil).value, 'RS');"style="overflow:auto; width:235px ; " /> <br> <button type="button" id="clearall" class = "button" class="btn-default" onclick = ClearAll(); style = "overflow:hidden;padding: 5px 5px; border-radius: 7px;font-size: 12pt; width:235px ; height:40px; font-weight: bold; font-family : Baskerville Old Face;border: 2px solid #808080; background-color: white;">Clear</button> </div> <div data-dojo-type="dijit/layout/ContentPane" title="...." > </div> <div data-dojo-type="dijit/layout/ContentPane" title="...." > </div> </div> </div> <div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" style="overflow:hidden;"> <div id="BasemapToggle"></div> <div id="HomeButton"></div> <div id = "infoDiv"> <div id = "legendDiv"></div> </div> <body >
... View more
08-02-2017
08:38 PM
|
0
|
6
|
678
|
POST
|
sir, i am getting error in this particular snippet. i do not understand what do you mean by full code. did u mean html part?
... View more
08-01-2017
10:29 PM
|
0
|
8
|
678
|
POST
|
but if we have 2 or more layer in the same service like r_soil layer, r_temp layer etc. is it appropirate way to do it? because i have to create a gdb of soil map and temp layer of many cities. and it shows on the map by user demand
... View more
07-31-2017
12:35 AM
|
0
|
1
|
447
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|