POST
|
Hi there I followed the exemple at ArcGIS Help 10.1 to made a geoprocessing task for a custom print. The web app is using version 3.2 of the JS API and it´s producing wrong results, namely when the basemap scale is out of range, its suppose to export the map with a "blank basemap" but the task seems to try to adjust something to the visibles layers . I´ve found that upgrading the API version the problem is solved but i cant convert the entire app now(lots of non AMD code) Can the exemple above be made using a SOE? I havent found any examples so that what im asking. The ArcGIS Server version is 10.1 Thanks
... View more
03-14-2016
05:09 AM
|
0
|
1
|
4689
|
POST
|
Hi there I am trying to make some network analysis hosted is a SOE(10.3.1) At some point i have to find the nearest junction from a point(this point is user input). I Have to use PointToEIDClass´s GetNearestJunction method. One of the parameters is sourceMap (IMap interface i think) I can´t seem to get this IMap from anywhere from inside the SOE. Is it possible to use PointToEIDClass inside a SOE? From where do i get IMap? Are there any alternatives to find the nearest junction from point? Thanks
... View more
12-15-2015
09:44 AM
|
0
|
1
|
2604
|
POST
|
Hi I have this scenario(requirements): In a web app that uses JS API (3.2) there are two layers, one of the polyline type and other a polygon type. Users should be able to select a geometry from the polyline layer and "insert it" into the polygon layer. The application should should validate if the selected polyline is "closed", convert it to a polygon and persist it into the polygon layer Any directions on this? I dont know which part of the api can do this Thanks
... View more
06-02-2014
10:36 AM
|
0
|
0
|
448
|
POST
|
Hi This post is quite old but i woke up to this recently. Odoe.net has a github project here that uses angular. My main doubt on this is how do I encapsulate esri widgets in angular directives, for example... I will definitly look into this subject
... View more
05-29-2014
03:53 AM
|
0
|
0
|
313
|
POST
|
I think the following should work, although I have not tested it: Determine the screen coordinates of the upper-left and upper-right corners of your inner div. You can do this by using the position() function of dojo/dom-geometry Convert these screen coordinates into esri/geometry/ScreenPoint objects by subtracting the x/y position of the map div's origin (upper-left corner of the map, in screen coordinates) Convert these ScreenPoints into map points using the toMapGeometry(...) function of esri/geometry/screenUtils The desired extent can be constructed using the map's top-left (map.extent.xmin, map.extent.ymax) and top-right (map.extent.xmax, map.extent.ymax) map coordinates along with the newly-calculated coordinates. You where right , thanks. Let me post the code: <!DOCTYPE html>
<html lang="en">
<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">
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style type="text/css">
html,body,#mapDiv{
width: 100%;
height: 100%;
padding: 0px;
margin: 0px;
}
.headerDiv{
position: absolute;
top: 0;
height: 15%;
width: 100%;
border: 1px solid black;
}
.outterDiv{
position:absolute;
width: 80%;
height: 84%;
border: 1px solid black;
bottom: 0;
right: 0;
top:auto;
}
.innerDiv{
position: absolute;
width: 100%;
height: 40%;
border: 0px solid black;
bottom: 0;
}
</style>
</head>
<body>
<div class="headerDiv">
Header
</div>
<div class="outterDiv">
<div id="mapDiv"></div>
<div id="inner" class="innerDiv">
<span>Some content</span>
</div>
</div>
<script src="http://js.arcgis.com/3.8compact/"></script>
<!--script src="//code.jquery.com/jquery-1.10.2.js"></script-->
<script type="text/javascript">
var map;
require([
"esri/map",
"esri/geometry/Extent",
"esri/dijit/Popup",
"esri/layers/ArcGISTiledMapServiceLayer",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/geometry/screenUtils",
"esri/geometry/ScreenPoint",
"esri/graphic",
"esri/symbols/SimpleFillSymbol",
"esri/symbols/SimpleMarkerSymbol",
"esri/geometry/Point",
"dojo/dom-geometry",
"dojo/dom",
"dojo/domReady!"
], function(
Map,
Extent,
Popup,
ArcGISTiledMapServiceLayer,
ArcGISDynamicMapServiceLayer,
screenUtils,
ScreenPoint,
Graphic,
SimpleFillSymbol,
SimpleMarkerSymbol,
Point,
domGeometry,
dom
) {
var initExtent = new Extent({
xmin: -13443133.0385669,
ymin: -4931105.568731996,
xmax: 17865473.74703294,
ymax: 9373014.156438931,
spatialReference: {
wkid: 102100
}
});
map = new Map("mapDiv", {
extent:initExtent,
zoom:5,
infoWindow: new Popup(null, dojo.create("div"))
});
var layers = [];
var basemap = new ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer");
layers.push(basemap);
/**
var wellsLayer = new ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer", {
"opacity" : 0.5
});
layers.push(wellsLayer);
*/
map.addLayers(layers);
map.on("layers-add-result",function(results){
console.log("Layers added");
var mapDivNode = dom.byId("mapDiv");
var mapDivNodePos = domGeometry.position(mapDivNode,false);
var innerDivNode = dom.byId("inner");
var pos = domGeometry.position(innerDivNode,false);
console.log("inner upper left:" + JSON.stringify(pos));
var screenPointUpperLeft =new ScreenPoint(pos.x - mapDivNodePos.x,pos.y - mapDivNodePos.y);
console.log("screenPointX" + JSON.stringify(screenPointUpperLeft));
var screenPointUpperRight =new ScreenPoint(pos.x + pos.w - mapDivNodePos.x,pos.y - mapDivNodePos.y);
console.log("screenPointY" + JSON.stringify(screenPointUpperRight));
var upperLeftPoint = map.toMap(screenPointUpperLeft);
var upperRightPoint = map.toMap(screenPointUpperRight);
console.log("onePoint" + JSON.stringify(upperLeftPoint));
/**
* Upper left point of inner div
*/
var p1 = new Point(upperLeftPoint.x,upperLeftPoint.y, map.spatialReference);
/**
* Upper right point of inner div - not needed for new extent calculation
*/
var p2 = new Point(upperRightPoint.x,upperRightPoint.y, map.spatialReference);
/**
* Let us see these point....
*/
var markerSymbol = new SimpleMarkerSymbol();
map.graphics.add(new Graphic(p1, markerSymbol));
map.graphics.add(new Graphic(p2, markerSymbol));
/**
* Create new extent - the lower left point of the envelope is the upper inner div left point
*/
var newExtent = new Extent(upperLeftPoint.x,upperLeftPoint.y,map.extent.xmax,map.extent.ymax,map.spatialReference);
/**
* Extent geometry
*/
var fillSymbol = new SimpleFillSymbol();
map.graphics.add(new Graphic(newExtent, fillSymbol));
});
});
</script>
</body>
</html> In fact this is only the first part of my problem; the other one is that i need to "center and zoom" a geometry to the center of this new extent but the "real" map extent must be unchanged. I will have to investigate on this further... Thanks again
... View more
02-28-2014
08:19 AM
|
0
|
0
|
433
|
POST
|
I think the following should work, although I have not tested it: Determine the screen coordinates of the upper-left and upper-right corners of your inner div. You can do this by using the position() function of dojo/dom-geometry Convert these screen coordinates into esri/geometry/ScreenPoint objects by subtracting the x/y position of the map div's origin (upper-left corner of the map, in screen coordinates) Convert these ScreenPoints into map points using the toMapGeometry(...) function of esri/geometry/screenUtils The desired extent can be constructed using the map's top-left (map.extent.xmin, map.extent.ymax) and top-right (map.extent.xmax, map.extent.ymax) map coordinates along with the newly-calculated coordinates. I will check on your tip
... View more
02-21-2014
01:26 PM
|
0
|
0
|
433
|
POST
|
Hi there I have a question about conversion from and to map coordinates and screen coordinates(pixels) I'm going to try to explain and i hope not to confuse. It's like this: Suppose we have a <div> that contains a map(no matter the size), and we have another div inside that sometimes presents information to the user. This second div has the same with as the map div, but has 40% of its heigth and its "glued" to the bottom of the map div. So, this leaves about 60% of the map visible. Now, what I need and can't calculate is the extent of that 60% in map coordinates. I hoope I did I made myself clear Thanks
... View more
02-21-2014
09:46 AM
|
0
|
4
|
721
|
POST
|
Hi there The documentation about snapping states that the snapping is enabled by default to all feature layers and graphic layers. It happens that in my web app, feature layers are always hidden and the user only interacts with layers from map services(views). The user draws on a graphic layer, persists the geometry and then the app refreshes the map and the information shown is from the "view" itself and not from the feature layer directly. Does this means that i cannot have snapping? Or i am understanding this wrong? Thanks
... View more
11-14-2013
09:27 AM
|
0
|
1
|
463
|
POST
|
I there Currently i am using version 3.2 of the API. I was reading the documentation about modules and classes both from esri and from dojo. The documentation itself is rather confusing about the the syntax to be used. I seems that dojo itself supports require syntax and, as of version 3.2, this syntax is not yet supported because esri modules are not migrated. So my question is this: is there any way to write modules using the most recent syntax (define syntax, etc...instead of dojo.provide, etc....) and still use\import esri namespaces(even if i have to import the whole esri namespace)? Can anyone point me to an example, for instance, load a map with an defined extent and basemap, using modules with the version 3.2 of the api? thanks
... View more
10-21-2013
09:44 AM
|
0
|
0
|
364
|
POST
|
Found it http://forums.arcgis.com/threads/32931-How-to-use-dojo.Deferred-dojo.DeferredList-and-.then Thanks guys 😛
... View more
10-07-2013
03:35 AM
|
0
|
0
|
243
|
POST
|
Hi there I need to chain several rest calls with the api to perform a complex search in a web app. Supose i need this: .execute for count .execute for object ids .test the objecids in an asp.net mvc WebApi service .execute the actual map query I may have to do this from 1 to 5 five times depending on the criteria entered by the user. Is there any way to coordinate all this? What i had in mind was: .execute for count(1 to five times) wait for all counts if there are less than 800 results .execute for object ids(1 to five timea)...and so on I thinks this is made using deferred´s, and promises but i dont know how to use them. Any directions? I´m using JS API 3.2. Thanks
... View more
10-04-2013
08:45 AM
|
0
|
1
|
1137
|
POST
|
Hi there I would like to know, at web app startup, which event is best to stop showing a splash sccreen. All the layers load relatively fast but sometimes they do take a while to render and i would like to show some splash screen to prevent users from push buttons until all is properlly shown. Thanks
... View more
07-09-2013
11:05 AM
|
0
|
1
|
651
|
POST
|
Hi Can anybody tell me where is the documentation for the JS API 3.2, please? Thanks
... View more
05-24-2013
03:00 PM
|
0
|
2
|
551
|
POST
|
Hi there I am having weird results with the interception of polygons which are adjacent. I´ll try to explain: suppose you have a ???big??? polygon. Then you draw, inside that polygon, two adjacent polygons (they are drawn using snapping). The interception results are two polygons (as it should) one for each adjacent polygon. In the end I have 5 polygons, the original 3 and the 2 from the interception. When I query these two resulting polygons to know which ones originate them I get this: A ??? Big polygon B1 ??? Adjacent polygon 1 B2 ??? Adjacent polygon 2 Result C1 ??? Interception result 1 C2 ??? Interception result 2 After querying these two I get this: C1=A + B1 + B2 C2=A + B1 + B2 Where I should get C1=A + B1 C2=A + B2 I hope I made myself clear I´m using api v 3.2 Thanks
... View more
05-02-2013
03:14 PM
|
0
|
1
|
476
|
POST
|
That puts a smile on my face. Thanks for the links! Hi there Definitely i am unable to ues/compile or whetever the dijit theme. Does anyone know if there is some boilerplate to use the bootstrap dijit theme? By the way, does Dojo have any theme builder like JQuery Theme builder? Thanks
... View more
02-11-2013
07:40 AM
|
0
|
0
|
76
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|