|
POST
|
Yes, I tried the 0.1 and i ask to one of my coworkers about the refresh time for the data and it is 1min app. So if i set up the time that u suggest it will work for sure. Hm another thing i noticed, in edge the refresh Interval for dynamic is making the layer does some snapping, but in chrome that snapping doesnt exist. Weird. Thanks for all ur help
... View more
07-27-2017
07:05 AM
|
0
|
0
|
2284
|
|
POST
|
Hello everyone, My question is the following. We have a service that we populated with GPS cars data and we made an app to show how the cars are moving on the map. We noticed that the data is refreshing too slow, and we actually want to see the cars movement on the map. I setted up the service as dynamic layer, and in the API there is a property called refreshInterval where the minimun interval is 1 minute and 0 if u want to stop autorefresh. Actually i didnt set up the property yet, so i dont know what is the default interval for the map. The table where we get the data is updated in less than a minute. So we realized the refresh is still very slow. Which is the best option for this? in terms on settings and programming in js. How i implement the layer is: var gpsCars = new ArcGISDynamicMapServiceLayer(layers.read_GPS(), {id:"gis_gps"});
gpsCars.setInfoTemplates({
0: {infoTemplate: myinfotemplate.getCarsInfo()}
});
gpsCars.setImageFormat("png32");
mapp.addLayers([..., gpsCars]); Thanks in advice
... View more
07-26-2017
08:41 AM
|
0
|
6
|
2554
|
|
POST
|
If u wanna do something like: U have to do it through the service in arcmap.
... View more
07-24-2017
02:01 PM
|
0
|
0
|
2728
|
|
POST
|
Add this to ur code, if that helps u, please mark this answer as a correct clusterLayer.on('click',function(e){
map.infoWindow.hide();
});
... View more
07-24-2017
01:55 PM
|
1
|
6
|
3866
|
|
POST
|
Maybe this can help u. Geoprocessing - Service area task | ArcGIS API for JavaScript 3.20
... View more
07-04-2017
02:14 PM
|
0
|
1
|
1533
|
|
POST
|
If u have the weather info as a layer (as rest service) u can use it on the map with map.addLayer() function.
... View more
07-04-2017
02:12 PM
|
0
|
1
|
1896
|
|
BLOG
|
I have a question. Why not let webpack handle the arcgis api? Some time ago i made a package.json and webpack.config.js with some help of some guys here ( @lobsteropteryx and @TomWayson) to run the api without any kind of problem (No extra code, no extra configuration, just KEEP IT SIMPLE). Right now i have learned a lot of new things, and i changed the code for webpack 2 (Nowadays is wp 3). Right now I can handle everything using import, like: import Map from 'esri/map'; (I let webpack compile as amd the whole app). So later, in the html i just import and make a file like this: <html lang="en">
<head>
<meta charset="utf-8">
<title>My App</title>
<meta name="description" content="ReactJS - Arcgis JS API - Webpack 2.">
<meta name="author" content="Evelyn Hernández">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width">
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)">
<meta name="apple-mobile-web-app-title" content="Material Console">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="format-detection" content="telephone=no">
<meta name="HandheldFriendly" content="True">
<meta http-equiv="cleartype" content="on">
<link rel="stylesheet" type="text/css" href="arcgis_js_api/library/3.17/3.17/dijit/themes/tundra/tundra.css" />
<link rel="stylesheet" href="arcgis_js_api/library/3.17/3.17//esri/css/esri.css">
<style>html, body { margin: 0; padding: 0; }</style>
</head>
<body class="claro">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
<script src="arcgis_js_api/library/3.17/3.17/init.js"></script>
<div id="app"></div>
<script type="text/javascript">require(["bundle.js"], function (bundle) {});</script>
</body>
</html>
The ArcGIS API files i have them in the root directory of my app with the name of arcgis_js_api that comes always inside the .zip from the download. I just modify the dojo.js and init.js HOSTNAME URL to = localhost:443 (cuz in the readme from the api, it says that only work in 2 ports). For those who use Webpack Dev Server and Webpack, my webpack.config,js (for webpack 2) and package.json with some utilities that i have found that are super good for developing apps with Arcgis for JS u can find them in this link: Package & WP 2 Config. · GitHub I hope this helps!
... View more
06-29-2017
02:44 PM
|
1
|
0
|
5095
|
|
POST
|
Nevermind, i realize a way to do it. I just add this to my code. var timeSlider = new TimeSlider({
style: "width: 100%;"
}, dom.byId("timeSliderDiv"));
map.setTimeSlider(timeSlider);
var timeExtent = new TimeExtent();
timeExtent.startTime = new Date("1/1/2000 UTC");
timeExtent.endTime = new Date("12/31/2009 UTC");
timeSlider.setThumbCount(1);
timeSlider.createTimeStopsByTimeInterval(timeExtent, 1, "esriTimeUnitsYears");
timeSlider.setThumbIndexes([0,1]);
timeSlider.setThumbMovingRate(2000);
timeSlider.startup();
var labels = arrayUtils.map(timeSlider.timeStops, function(timeStop, i) {
if ( i % 2 === 0 ) {
return timeStop.getUTCFullYear();
} else {
return "";
}
});
timeSlider.setLabels(labels);
timeSlider.on("time-extent-change", function(evt) {
var startValString = evt.startTime.getUTCFullYear();
var endValString = evt.endTime.getUTCFullYear();
dom.byId("daterange").innerHTML = "<i>" + startValString + " and " + endValString + "<\/i>";
});
timeSlider.loop=true;
... View more
06-21-2017
02:09 PM
|
1
|
0
|
1483
|
|
POST
|
Hello community, I want to make a timeslider with a Heatmap made from a featureLayer that i have in my rest service but i wanna know if somebody has made anything similar or how is the proper way to do it. I have this for makin the heatmap and it works, but i want to make a timeslider with it. var serviceUrl = "myserver/MapServer/1?f=json&token=" + resolve;
var heatmapFeatureLayerOptions = {
mode: FeatureLayer.MODE_SNAPSHOT,
outFields: ["*"]
};
var heatmapFeatureLayer = new FeatureLayer(serviceUrl, heatmapFeatureLayerOptions);
var heatmapRenderer = new HeatmapRenderer({
colors: ["rgba(0,255,0, 0)","rgb(255, 255, 0)","rgb(255, 0, 0)"],
blurRadius: 16,
maxPixelIntensity: 250,
minPixelIntensity: 5
});
heatmapFeatureLayer.setRenderer(heatmapRenderer);
map.addLayer(heatmapFeatureLayer); I already know that the feature service has to have the timeextent setted up in the service, but how can i make a timeslider that shows this heatmap made? Thanks in advice! Any example will be really appreciated!
... View more
06-21-2017
02:01 PM
|
0
|
1
|
2284
|
|
POST
|
Also i think i have seen a property in some layer (dont remember if featured or dynamic) to add the token via property, like: .... token: mytoken, ...
... View more
05-26-2017
11:18 AM
|
0
|
0
|
1016
|
|
POST
|
Why u dont edit the data before u pass it to the component? So everytime u have the null or "" parameter u can fill it with anything u want before u add it to the feature table.
... View more
05-26-2017
11:12 AM
|
0
|
0
|
680
|
|
POST
|
Why u need to extend that layer class? Also u can make something like ... var map = {
createMap: function(div,basemap,centerx,centery,zoom){
this.map = new esri.Map(div, {
center:[centerx, centery],
basemap: basemap,
zoom:zoom,
logo: false
});
return this.map;
},
getMap: function(){
return this.map;
}
}
export map;
... View more
05-26-2017
11:10 AM
|
0
|
1
|
3383
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-21-2017 02:09 PM | |
| 1 | 04-10-2015 07:52 AM | |
| 1 | 03-23-2016 02:08 PM | |
| 1 | 02-22-2016 05:01 AM | |
| 1 | 10-09-2018 07:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-01-2024
03:05 AM
|