POST
|
when you creates an object for layer, you can use build-in method onError - its tests if service is avaliable for example:
var baseMap = new esri.layers.ArcGISDynamicMapServiceLayer('http://youservice', {
id : 'layerBaseMap'
});
baseMap.onError = function(error) {
console.log(error);
};
EDIT: but it only launch when the service link is correct link to your arcgis server. If you add wrong address to whole arcgis server it will NOT fires up.
... View more
10-04-2012
12:13 AM
|
0
|
0
|
180
|
POST
|
OK. so I figured it out!!! 🙂 the problem was as I wrote before - when I release mouse button, but still moves mouse over the screen the map was moving with me. (only in google chrome) but when I changed event from onPanStart/Stop to onMouseDragStart/Stop everything works good, but I had to check if pan tool is active. but still..3days went to hell! 😉 with greetings Krystian.
... View more
10-02-2012
07:03 AM
|
0
|
0
|
634
|
POST
|
would it be possible to on pan start - hide graphicsLayer on pan end - show graphicsLayer. yes, I do this, but on pan start / end I've got really lots of code so I past only interesting parts of code. Now when I'm testing application I see, that this problem occuress only in google chrome (my. version is 22.0.1229.79 m) FF or IE is OK. another observation when I click mouse button and fast move map and in the end of panning I release mouse button but still move mouse the map is moving by the trace of my mouse (its only about for ~0.2 sec.) but if i move map very quickly I can pan a lot of area and then the postion-error can be saw exactly.
... View more
10-02-2012
06:12 AM
|
0
|
0
|
494
|
POST
|
ok so below is my general concept of application when application is started, user can pick the region to show points on the map. He picks something, then by AJAX my script is connecting to database which is returning X,Y coordinates for points, then I create json contains those coordinates and by addGraphics() points are on the map. Now, in event onPanStart I've got sequence:
MAP.map.onPanStart = function() {
MAP.map.disableMapNavigation();
};
and onPanEnd:
MAP.map.onPanEnd = function(extent, endPoint) {
if(checkIfExtentContainsBoreholes()){
if (MAP.points.length > 0) {
MAP.drawPoints();
}
};
};
and first if statement (checkIfExtentContainsBoreholes) checks if database contains points from my extent, and if its true, then it put points by the same function as is before (coordinates to json..) so when onPanEnd drawing event has started I can pan map again, and if the graphics still are not on the map and I pan map to other place they appears badly(because the SVG graphic is drawing by relative coordinates to top-left corner of the map)
... View more
10-02-2012
05:34 AM
|
0
|
0
|
494
|
POST
|
That's the default, setting it to false might help performance. Does this happen when you only have a few graphics or only when you've got many? I've read before all links that you sent. It's doesn't matter which browser, or how many graphics are there. I think that JS api can't help me (I really 'know by heart' arcgis JS api documentation 😉 ) from my debugging I can tell that problem is with SVG graphic, it takes some time to add graphics nodes to HTML file and untill this process is ended I should freeze pan option. But I dont know to which event handle this, becouse as I said before $(function(){}) (document.ready() ) not resolve the problem.
... View more
10-02-2012
05:09 AM
|
0
|
0
|
494
|
POST
|
it's depends (scale, terrain etc.) but it's from 1 - 3000 graphics points per screen. yeah... displayGraphicsOnPan:true is set, but my problem is that AFTER the pan is over points arent in the same geographic positions.
... View more
10-02-2012
04:48 AM
|
0
|
0
|
494
|
POST
|
hello, I've got some problems with drawing graphics point on client side. The problem is, when I draw points by first time by JS api everything is OK. But when points exists and I try to realy fast pan my map window from left to right (for example) my graphic layer can't finish drawing before one pan is ended. After few this kind of operations I can see, that my graphics points aren't in the geographic position as they should be when I started to pan. My question is how can I block again pan untill my graphic is drawn properly. I think it is the only way to prevent described situation. I would like to mention, that I'm using jQuery for this application and I tried many many tricks like setting flag and setting enableMapNaviagtion() after document ready, I have tried to setTimeout, but for now this doesnt works. Can anybody helps me?
... View more
10-02-2012
04:39 AM
|
0
|
11
|
1256
|
POST
|
now I'm testing many options to add points. I get points coordinates from an array, then to avoid hang up a web browser I'm spliting data for parts (1 part = 1000 points) and then tryin to add via API function. My code looks like: points is an array with coordinates in format [[x1,y1],[x2,y2].....[x100000,y100000]];
var layerSelectedBoreholes = new esri.layers.GraphicsLayer({displayOnPan: false});
var length = points.length;
var tmparray = [];
var i = 0;
while (i < length){
tmparray.push(points);
i++;
if (i % 1000 == 0){
pointsPart = getMultiPointFeature(tmparray);
var gra = new esri.Graphic(pointsPart);
layerSelectedBoreholes.add(gra);
console.log(i);
tmparray = [];
}
}
function getMultiPointFeature(points){
var multiPoint = {"geometry":{"points":points,"spatialReference":2180},
"symbol":{
"style":"STYLE_CIRCLE",
"size":3,
"color":[0,0,0,255],
"type":"esriSMS",
"outline":{
"style":"STYLE_SOLID",
"color":[0,0,0,255],
"width":0,
"type":"esriSLS"
}
}
};
return multiPoint;
}
thanks for advice with Point Clustering I have to check it.
... View more
06-19-2012
04:00 AM
|
0
|
0
|
1191
|
POST
|
hello, I've got problem, I'm creating map based application, and now I have to add to map about 100 000 graphic points, from coordinates. I was trying in many ways to do it, but always process of adding points takes about 7-10 secounds, or my web browser just hang on. is it even possible to add this amount of data to map without having problems with performance? thanks for any advices!:)
... View more
06-19-2012
01:28 AM
|
0
|
9
|
2199
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|