POST
|
Is there any way to configure basemap of Qucik Report Template to work offline? Please suggest. Regards, Krish
... View more
06-04-2017
09:08 PM
|
0
|
2
|
1611
|
POST
|
Allen, Please find below link, which gives u idea to create custom widget: Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers Also you can have a look at below custom widget for your reference. GitHub - URSpatial/WAB_AddShapefile: Web AppBuilder for ArcGIS widget for uploading shapefiles to the web map as a featu… Hope this helps. Regards, Krish
... View more
06-04-2017
08:38 AM
|
1
|
0
|
939
|
POST
|
As 2D labeling is not supported now, you can try TextSymbols. Please find below link: TextSymbol | API Reference | ArcGIS API for JavaScript 4.3
... View more
05-31-2017
03:27 AM
|
0
|
0
|
975
|
POST
|
Hi Robert, Wow! Perfect! Thank you so much...!!! Regards, Krish
... View more
05-10-2017
10:17 AM
|
0
|
0
|
2290
|
POST
|
Hello Robert, Thanks for your response. I tried code suggested by you to move point from one coordinate to another as shown below. But animate is not shown on map. Please let me know where I'm doing wrong. <!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></title>
<link rel="stylesheet" href="https://js.arcgis.com/3.20/esri/css/esri.css">
<style>
html, body, #map {
height: 100%; width: 100%; margin: 0; padding: 0;
}
</style>
<script src="https://js.arcgis.com/3.20/"></script>
<script>
var map;
require(["esri/map","esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol",
"esri/symbols/PictureFillSymbol", "esri/symbols/CartographicLineSymbol",
"esri/graphic", "dojox/gfx/fx", "dojo/_base/lang",
"esri/Color", "dojo/dom", "dojo/on", "esri/geometry/ScreenPoint",
"dojo/domReady!"],
function(Map, SimpleMarkerSymbol, SimpleLineSymbol,PictureFillSymbol, CartographicLineSymbol,
Graphic, fx, lang,
Color, dom, on, ScreenPoint)
{
var options = { basemap : "gray",
center : [-29.88, 21.86133],
zoom : 3 };
map = new esri.Map("mapDiv", options);
var linepath = [
[ -29.88231249999835 , 21.861337104185896 ] ,
[ -29.706531249998385 , 23.64436466438422 ] ,
[ -26.89403124999913 , 29.152009189365007 ] ,
[ -25.4877812499995 , 31.57838706044446 ] ,
[ -22.85106250000021 , 34.08891708698886 ] ,
[ -19.862781250001014 , 36.66827922896022 ] ,
[ -18.104968750001476 , 37.787943753057206 ] ,
[ -14.765125000002355 , 39.300164419151855 ] ,
[ -12.655750000002914 , 39.97698664383719 ] ,
[ -10.370593750003529 , 40.64717142579546 ] ,
[ -8.085437500004144 , 41.178522893330914 ] ,
[ -4.218250000005169 , 41.574231022027256 ] ,
[ 0.7036249999935258 , 41.836698107532534 ] ,
[ 4.746593749992446 , 41.836698107532534 ] ,
[ 9.316906249991233 , 41.836698107532534 ] ,
[ 12.48096874999041 , 41.836698107532534 ] ,
[ 12.8325312499903 , 41.836698107532534 ] ,
];
var markerSymbol = new SimpleMarkerSymbol();
markerSymbol.setPath(
"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z"
);
markerSymbol.setColor(new Color("#00FFFF"));
var gLayerVehicle = new esri.layers.GraphicsLayer({"id" : "Vehicle"});
map.addLayer(gLayerVehicle);
setInterval(test, 3000);
var counter = 0;
function test(){
gLayerVehicle.clear();
var p1 = new esri.geometry.Point(linepath[counter]);
var p2 = new esri.geometry.Point(linepath[counter+1]);
var pt1Graphic = new esri.Graphic(p1, markerSymbol);
gLayerVehicle.add(pt1Graphic);
var shape = pt1Graphic.getShape();
var sp1 = map.toScreen(p1);
var sp2 = map.toScreen(p2);
var mp1 = map.toMap(new ScreenPoint(sp2.x, sp2.y));
fx.animateTransform({
duration: 1200,
shape: shape,
transform: [{
name: "translate",
start: [sp1.x, (sp1.y - shape.bbox.b)],
end: [sp2.x, (sp2.y - shape.bbox.b)]
},
{
name: "original"
}],
onEnd: lang.hitch(this, function(){
pt1Graphic.setGeometry(mp1);
})
}).play();
counter++;
}
}
);
</script>
</head>
<body>
<div id="mapDiv"></div>
</body>
</html> Regards, Krish
... View more
05-10-2017
08:36 AM
|
0
|
2
|
2290
|
POST
|
Hi Robert, Thanks for your quick response! I have tried above code and observed when I pan on map and create point, graphic moves to different screen coordinates. Please suggest how to achieve this. Regards, Krish
... View more
05-09-2017
09:24 PM
|
0
|
4
|
2290
|
POST
|
I have tried to animate graphic from one location to another as shown in below code: <!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>Animate Graphic</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.20/esri/css/esri.css">
<style>
#info {
top: 20px;
color: #444;
height: auto;
font-family: arial;
right: 20px;
margin: 5px;
padding: 10px;
position: absolute;
width: 115px;
z-index: 40;
border: solid 2px #666;
border-radius: 4px;
background-color: #fff;
}
html, body, #mapDiv {
padding:0;
margin:0;
height:100%;
}
button {
display: block;
}
</style>
<script src="https://js.arcgis.com/3.20/"></script>
<script>
var map, tb;
require([
"esri/map", "esri/toolbars/draw",
"esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol",
"esri/symbols/PictureFillSymbol", "esri/symbols/CartographicLineSymbol",
"esri/graphic", "dojox/gfx/fx","dojo/_base/lang",
"esri/Color", "dojo/dom", "dojo/on", "dojo/domReady!"
], function(
Map, Draw,
SimpleMarkerSymbol, SimpleLineSymbol,
PictureFillSymbol, CartographicLineSymbol,
Graphic, fx, lang,
Color, dom, on
) {
map = new Map("mapDiv", {
basemap: "streets",
center: [-25.312, 34.307],
zoom: 3
});
map.on("load", initToolbar);
var markerSymbol = new SimpleMarkerSymbol();
markerSymbol.setPath("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z");
markerSymbol.setColor(new Color("#00FFFF"));
function initToolbar() {
tb = new Draw(map);
tb.on("draw-end", addGraphic);
// event delegation so a click handler is not
// needed for each individual button
on(dom.byId("info"), "click", function(evt) {
if ( evt.target.id === "info" ) {
return;
}
var tool = evt.target.id.toLowerCase();
map.disableMapNavigation();
tb.activate(tool);
});
}
function addGraphic(evt) {
//deactivate the toolbar and clear existing graphics
tb.deactivate();
//map.enableMapNavigation();
var symbol;
if ( evt.geometry.type === "point") {
symbol = markerSymbol;
var g=new Graphic(evt.geometry, symbol);
map.graphics.add(g);
setTimeout(lang.partial(function(animateMe) {
var shape = animateMe.getDojoShape();
var sp1 = map.toScreen(evt.geometry);
fx.animateTransform({
duration: 1200,
shape: shape,
transform: [{ name: "translate", start:[sp1.x,sp1.y], end:[sp1.x+50,sp1.y] }]}).play();
}, g), 0);
}
}
});
</script>
</head>
<body>
<div id="info">
<div>Select and draw on map to add graphic</div>
<button id="Point">Point</button>
</div>
<div id="mapDiv"></div>
</body>
</html>
Animation function is working but graphic moves to different screen coordinates. Please suggest. Regards, Krish
... View more
05-09-2017
12:04 AM
|
0
|
8
|
4909
|
POST
|
You can find Search widget as shown in below screenshot: Regards, Krish
... View more
01-27-2017
04:26 AM
|
1
|
2
|
551
|
POST
|
Hi Robert Scheitlin, GISP, Now, my widget is working as expected after adding setTimeout function. Thank you so much! Regards, Krish
... View more
01-09-2017
01:49 AM
|
0
|
0
|
324
|
POST
|
Hi Robert Scheitlin, GISP, Just now I have observed that value is not saved. When trying with this line, evt.target.applyEdits(null, [feat], null); I'm getting below error. Please suggest how to proceed. Regards, Krish
... View more
01-06-2017
06:01 AM
|
0
|
2
|
966
|
POST
|
Yes, it is working. You need to add a zipped shapefile. You can find this widget at AddShapeFileWidget Regards, Krish
... View more
01-05-2017
08:45 PM
|
2
|
0
|
467
|
POST
|
Hi Robert Scheitlin, GISP, I said working as It is now working as expected after commenting below line. I'm getting the required name inside the attribute inspector. Hence I marked your answer as correct. feat.getLayer().applyEdits(null, [feat], null); As suggested by you, I have added below line: evt.target.applyEdits(null, [feat], null); But after adding this line, I'm getting below error. I'm not sure why I'm getting this error: Regards, Krish
... View more
01-05-2017
08:27 PM
|
0
|
4
|
966
|
POST
|
Hello Robert Scheitlin, GISP, Please find the screenshot below: Hence, I have commented below line: feat.getLayer().applyEdits(null, [feat], null); Regards, Krish
... View more
01-05-2017
05:45 AM
|
0
|
7
|
966
|
POST
|
HiRobert Scheitlin, GISP, Thank you so much! Now, it is working... But below line is giving error. feat.getLayer().applyEdits(null, [feat], null); Regards, Krish
... View more
01-04-2017
11:02 PM
|
0
|
9
|
966
|
POST
|
Hi Syed, This is off-panel widget and you can get this in widget tab as shown in below screenshot: Regards, Krish
... View more
01-03-2017
09:26 PM
|
1
|
1
|
1128
|
Title | Kudos | Posted |
---|---|---|
1 | 11-16-2021 03:44 AM | |
1 | 08-21-2019 10:49 PM | |
1 | 12-08-2020 08:29 PM | |
1 | 12-08-2020 01:22 AM | |
1 | 06-04-2017 08:38 AM |
Online Status |
Offline
|
Date Last Visited |
01-11-2024
03:54 PM
|