POST
|
That's the method I use to add a geoJSON do my map, You need to put the requires and adjust to your application. function loadJson(content, title) {
var obj = eval('(' + content + ');');
var gl = new GraphicsLayer({
title: title
});
if (obj.features) {
var symbol;
switch (obj.geometryType) {
case "esriGeometryPolyline":
symbol = simboloAdicionaCamadaLinha.clone();
break;
case "esriGeometryPoint":
symbol = simboloAdicionaCamadaPonto.clone();
break;
case "esriGeometryPolygon":
var symbol = simboloAdicionaCamadaPoligono.clone();
break;
};
if (obj.spatialReference.wkid != 4326) {
copagisAlert.info('Sistema de coordenadas da camada a adicionar na web deve ser o GCS_WGS_1984 WKID: 4326');
return false;
}
for (var i = 0; i < obj.features.length; i++) {
var graphic = new Graphic({
geometry: geometryJsonUtils.fromJSON(obj.features[i].geometry),
symbol: symbol,
attributes: obj.features[i].attributes
});
gl.add(graphic);
}
gl.then(function () {
view.goTo(gl.graphics);
});
map.add(gl);
}
}
... View more
02-06-2018
03:19 AM
|
1
|
0
|
446
|
POST
|
Thanks for your reply, I'm using oracle 11g and the problem only occurs with versioned datasets. I will send this to ESRI to see if they have a clue (I doubt)
... View more
01-30-2018
05:11 AM
|
1
|
0
|
873
|
POST
|
Hi Robert, the problem continues. Any other advices?
... View more
01-30-2018
01:46 AM
|
0
|
2
|
873
|
POST
|
Hi Robert, I will change this setting but I don't think that's the problem decause the problem occurs the first time I try to call applyedits after the service is started, the others calls is ok.
... View more
01-29-2018
09:20 AM
|
1
|
3
|
873
|
POST
|
Recicle every 24 hours starting 4:30 am Check and repair instances every: 30 minutes
... View more
01-29-2018
08:56 AM
|
0
|
1
|
873
|
POST
|
I have the following scenario: A MXD containing about 60 layers divided in 5 featuredatasets, 2 of that datasets is registered as versioned. The MXD is published in Arcgis Server with the Resource os MapServer and FeatureServer enabled. The servevice is configured with a maximum instances of 10 and minimum of 2. When I start, the service starts with 2 instaces "up" and I have no problem showing the map but when I try to edit a fetaure the first editing operation takes about 90 seconds to run (the service show that 1 instance is in use on ArcGIS Server Manager). The followings editing operations performs normally taking about 2 seconds to execute. This problem occurs only when edditing a feature with this featuredataset registered as versioned, with non versioned always runs fast. My question is: Why this delay on the first operation if the instance is already running? Its possible to solve that? P.S.: Sorry for my poor English.
... View more
01-29-2018
07:02 AM
|
1
|
9
|
1024
|
POST
|
It seens if you call view.scale 2 times it forces to go to that scale, so I'm using this code as a workaround: view.scale = 10000
view.scale = 10000
... View more
12-05-2017
02:22 AM
|
0
|
1
|
797
|
POST
|
Can you provide some sample of your code? How you are trying to store the data in cookies? Have you tried to call toJSON of the extent and then stringfy that data to store?
... View more
11-28-2017
07:57 AM
|
2
|
1
|
1119
|
POST
|
Change this: map.graphics.add(graphic); to this: map.on("load", function(){
map.graphics.add(graphic);
}); The map should be loaded before you add the graphics
... View more
11-28-2017
06:35 AM
|
0
|
1
|
602
|
POST
|
You can use QueryTask to verify if your mouse cursor is near a feature and chnage the mouse cursor of the mapdiv, here is some example to begin with (not tested). I'm using jQuery to change the cursor but you can use anything you want. #mapDiv is the div of your map var eventHandler = function (event) {
require(["esri/tasks/QueryTask", "esri/tasks/support/Query"], function(QueryTask, Query){
var queryTask = new QueryTask({
url: "..." // URL of the layer you want to change the mouse cursor
});
var query = new Query();
query.returnGeometry = false;
query.distance = 1; // Yout buffer
query.units = "meters"
query.outFields = ["*"];
// When resolved, returns a count of the features that satisfy the query.
queryTask.executeForCount(query).then(function(results){
//change the cursor here
if(results>=1){
$('#mapDiv').css('cursor', 'pointer');
}
else{
$('#mapDiv').css('cursor', 'default');
}
});
});
}
view.on("pointer-move", eventHandler);
... View more
11-28-2017
03:09 AM
|
1
|
1
|
921
|
POST
|
I have a GraphicsLayer with point symbols and I want to highlight the symbol when the user hover that symbol. I'm doing that using the view.hitTest method but the symbol is not updated. The solution I found is moving the center of the view slightly and that way the symbol is updated but the performance is very poor, causing a delay to highlight the symbol. removing and adding the graphic to the GraphicsLayer could be a solution but the order of the graphics is important to me. Is there a way to refresh the GraphicsLayer or just the Graphic itself?
... View more
11-23-2017
07:15 AM
|
0
|
1
|
448
|
POST
|
I was already doing it that way, I'm wondering if is possible do do that without another roundtrip to the server. Thank you for your reply
... View more
11-21-2017
04:42 AM
|
0
|
1
|
642
|
POST
|
Whats is the way (if exists) to get the geometry type (point, line, polygon) of a MapImageLayerSublayer? I'm using js API 4.5. The way i'm doing is going on the server again and geting the json of the layer to get the geometry type
... View more
11-17-2017
08:26 AM
|
0
|
4
|
881
|
POST
|
I have a MapImageLayer with a point sublayer that I insert data outside the API, mt problem is that the newly inserted data is not refreshed until I move the map, how to refresh te MapImageLayer to reflect the changes made outside the API?
... View more
11-01-2017
02:54 AM
|
0
|
4
|
2771
|
Title | Kudos | Posted |
---|---|---|
1 | 01-30-2018 05:11 AM | |
1 | 03-06-2018 04:36 AM | |
1 | 11-28-2017 03:09 AM | |
1 | 02-06-2018 03:19 AM | |
1 | 07-10-2019 07:22 AM |
Online Status |
Offline
|
Date Last Visited |
02-07-2023
06:33 PM
|