|
POST
|
Is there an estimate when the JS API will be fully AMD-compliant and built with Dojo 1.8? No estimate for both. We will get there, but do currently have an estimated timeline. I can say the next version of the API (3.2, due out shortly) will continue to use Dojo 1.7. What specific things are you looking to do that you cannot do with Dojo 1.7 and non-AMD style modules?
... View more
09-11-2012
12:51 PM
|
0
|
0
|
4059
|
|
POST
|
There's a duplicated vertex in your line which is causing the calculation to fail. Try this:
var line = new esri.geometry.polyline({
"paths": [
[
[-113.3388907526918, 53.6252478988518],
[-113.27571936597303, 53.57961406863708],
// [-113.27571936597303, 53.57961406863708], // duplicate
[-113.27571936597303, 53.566566774741844],
[-113.28121253003553, 53.53964401478653],
[-113.30318518628555, 53.519236579065456],
[-113.32241126050428, 53.50943751677841],
[-113.34438391675431, 53.50943751677841],
[-113.36772986401994, 53.51025419185318],
[-113.3869559382387, 53.51678702593175],
[-113.41167517651995, 53.53882790615631],
[-113.41030188550432, 53.560041617991864],
[-113.40068884839496, 53.58613620592375],
[-113.35262366284805, 53.62036091795674],
[-113.3388907526918, 53.6252478988518]
]
],
"spatialreference": {
"wkid": 4326
}
});
On jsfiddle (length printed to the console): http://jsfiddle.net/nLpax/
... View more
09-07-2012
05:45 AM
|
0
|
0
|
1737
|
|
POST
|
I think my situation is similar to Ingrid here, wherein there are a lot of NULL attributes in the data. I am completely confused about this right now, please help me out on these queries: Will these NULL attributes affect the print code of the JS API only when they are present in results ? (I think this might not be the case since I have removed NULL attributes for the retrieved data and still encountered the same error) Does the print code consider the data attributes of all the layers of the map ? (Although the print code works fine when no graphics are selected) Ingrid's situation was complicated by the fact that an ItemFileReadStore was being created using esri.Graphic.attributes objects. The ItemFileReadStore was modifying the structure of esri.Graphic.attributes and that, along with many null values, was causing the problem. In Ingrid's case, we were able to get to a solution relatively quickly because code to reproduce was posted. Can you post some code to repro your issue?
... View more
09-07-2012
05:30 AM
|
0
|
0
|
2637
|
|
POST
|
I'm not all that familiar with our routing functionality but what's the specific error you're seeing? Can you post a simple test page that shows the problem?
... View more
09-06-2012
11:41 AM
|
0
|
0
|
1091
|
|
POST
|
Just to piggy back on what Kelly said, the Identity Manager requires SSL so you have to run your app over https and access your map/feature services over https.
... View more
09-06-2012
08:59 AM
|
0
|
0
|
920
|
|
POST
|
Start with any of our samples: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm For instance, you can start with a simple topo map example: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/map_topo.html We also have getting started docs: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_devenv.htm http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_accessapi.html
... View more
09-06-2012
07:11 AM
|
0
|
0
|
1102
|
|
POST
|
I modified the print sample to use your symbols: <!doctype html> <html lang="en"> <head> <meta 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="http://serverapi.arcgisonline.com/jsapi/arcgis/3.1/js/dojo/dijit/themes/nihilo/nihilo.css"> <style type="text/css"> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } body{ background-color: #fff; overflow:hidden; font-family: sans-serif; } label { display: inline-block; padding: 5px 5px 0 5px; font-weight: 400; font-size: 12pt; } #header { padding-top: 4px; padding-right: 15px; color: #444; font-size:16pt; text-align:right;font-weight:bold; height:55px; background: #fff; border-bottom: 1px solid #444; } #subheader { font-size:small; color: #444; text-align:right; padding-right:20px; } #header, #subheader { text-shadow: 1px 1px 1px #cee1f0; filter: dropshadow(color=#cee1f0, offx=1, offy=1); } #rightPane{ margin: 0; padding: 10px; background-color: #fff; color: #421b14; width: 180px; } .ds { background: #000; overflow: hidden; position: absolute; z-index: 2; } #ds-h div { width: 100%; } #ds-l div, #ds-r div { height: 100%; } #ds-r div { right: 0; } #ds .o1 { filter: alpha(opacity=10); opacity: .1; } #ds .o2 { filter: alpha(opacity=8); opacity: .08; } #ds .o3 { filter: alpha(opacity=6); opacity: .06; } #ds .o4 { filter: alpha(opacity=4); opacity: .04; } #ds .o5 { filter: alpha(opacity=2); opacity: .02; } #ds .h1 { height: 1px; } #ds .h2 { height: 2px; } #ds .h3 { height: 3px; } #ds .h4 { height: 4px; } #ds .h5 { height: 5px; } #ds .v1 { width: 1px; } #ds .v2 { width: 2px; } #ds .v3 { width: 3px; } #ds .v4 { width: 4px; } #ds .v5 { width: 5px; } /* make all dijit buttons the same width */ .dijitButton .dijitButtonNode, #drawingWrapper { width: 160px; } </style> <script>var dojoConfig = { parseOnLoad: true };</script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1"></script> <script> dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.form.Button"); dojo.require("dijit.form.CheckBox"); dojo.require("esri.map"); dojo.require("esri.toolbars.draw"); dojo.require("esri.dijit.Print"); var app = {}; app.map = null, app.toolbar = null, app.circle = false, app.symbols = null, app.printer = null; function init() { esri.config.defaults.io.proxyUrl = "/~dswingley/esri_js/proxy/proxy.php"; var initialExtent = new esri.geometry.Extent({"xmin":-10399332,"ymin":3440549,"xmax":-9801289,"ymax":3705938,"spatialReference":{"wkid":102100}}); app.map = new esri.Map("map", { extent: initialExtent, wrapAround180: true }); dojo.connect(app.map, 'onLoad', function() { dojo.connect(dijit.byId('map'), 'resize', app.map, app.map.resize); app.toolbar = new esri.toolbars.Draw(app.map); dojo.connect(app.toolbar, "onDrawEnd", addToMap); }); // print dijit app.printer = new esri.dijit.Print({ map: app.map, url: "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task" }, dojo.byId("printButton")); app.printer.startup(); var url = "http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer"; var tiledLayer = new esri.layers.ArcGISTiledMapServiceLayer(url, { "id": "Ocean" }); app.map.addLayer(tiledLayer); // add census boundary dyn map svc var dynUrl = "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer"; var dynLayer = new esri.layers.ArcGISDynamicMapServiceLayer(dynUrl, { "id": "Boundaries" }); app.map.addLayer(dynLayer); // create a check box dojo.forEach(["Boundaries", "Ocean"], function(id) { new dijit.form.CheckBox({ id: "cb_" + id, name: "cb_" + id, checked: true, onChange: function(bool) { bool ? app.map.getLayer(this.id.split('_')[1]).show() : app.map.getLayer(this.id.split('_')[1]).hide(); } }, dojo.create('input', { id: 'lyr_' + id })).placeAt(dojo.byId('layerToggle')); // create a label for the check box var label = dojo.create('label', { "for": "cb_" + id, "innerHTML": id }); dojo.place(label, dojo.byId('layerToggle')); dojo.place(dojo.create('br'), dojo.byId('layerToggle')); }); // set up symbols for the various geometry types app.symbols = {}; var es = esri.symbol; var dc = dojo.Color; app.symbols.point = new es.SimpleMarkerSymbol(es.SimpleMarkerSymbol.STYLE_SQUARE, 20, null, new dc([255, 255, 0, 0.5])); app.symbols.polyline = new es.SimpleLineSymbol("dashdot", new dc([255, 0, 255]), 5); app.symbols.polygon = new es.SimpleFillSymbol(es.SimpleFillSymbol.STYLE_SOLID, new es.SimpleLineSymbol("dashdot", new dc([255, 0, 0]), 5), new dc([255, 255, 0, 0.25])); // find the divs for buttons dojo.forEach(dojo.query(".drawing"), function(btn) { var button = new dijit.form.Button({ label: btn.innerHTML, onClick: function() { activateTool(this.id); }, style: { "width": "100%", "margin": "3px auto", "textAlign": "center" } }, btn); }); } function addToMap(geom) { app.toolbar.deactivate(); app.map.showZoomSlider(); var graphic = new esri.Graphic(geom, app.symbols[geom.type]); app.map.graphics.add(graphic); } function activateTool(type) { app.toolbar.activate(type); app.map.hideZoomSlider(); } dojo.ready(init); </script> </head> <body class="nihilo"> <div id="mainWindow" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline',gutters:false" style="width: 100%; height: 100%; margin: 0;"> <div id="header" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'"> Print Dijit: Out of the Box Printing for the ArcGIS API for JavaScript <div id="subheader">Requires ArcGIS Server 10.1</div> </div> <div id="map" class="shadow" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"> <!-- drop shadow divs --> <div id="ds"> <div id="ds-h"> <div class="ds h1 o1"></div> <div class="ds h2 o2"></div> <div class="ds h3 o3"></div> <div class="ds h4 o4"></div> <div class="ds h5 o5"></div> </div> <div id="ds-r"> <div class="ds v1 o1"></div> <div class="ds v2 o2"></div> <div class="ds v3 o3"></div> <div class="ds v4 o4"></div> <div class="ds v5 o5"></div> </div> </div> <!-- end drop shadow divs --> </div> <div id="rightPane" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'right'"> <div id="printButton"></div> <hr /> <div id="drawingWrapper"> Add some graphics: <div id="point" class="drawing">Point</div> <div id="freehandpolyline" class="drawing">Freehand Polyline</div> <div id="freehandpolygon" class="drawing">Freehand Polygon</div> </div> <hr /> <div id="layerToggle"> Toggle Layers: <br /> <!-- checkbox and labels inserted programmatically --> </div> </div> </div> </body> </html>??? The print output from that page honors symbol transparency. In your initial post, you said "After a few prints". Does the issue you're describing happen when hitting your print button multiple times? Is it possible that you're adding graphics multiple times which cause them to appear less transparent than you're expecting?
... View more
09-06-2012
04:46 AM
|
0
|
0
|
2555
|
|
POST
|
I've had a similar issue in the past. I ended up issuing an Identify task for the active tab. When the user switched tabs, I would send another request for the layer that corresponded to the newly active tab. Also a good idea! But an info window with 14 tabs makes me cringe.
... View more
09-05-2012
04:27 PM
|
0
|
0
|
3351
|
|
POST
|
Would it be better to have the client turn on the layers he would like to identify? Absolutely, yes. The performance issue you're seeing is likely caused by one or both of the following: the server querying 14 layers for features sending features from 14 layers across the network It's likely a combination of both. The fastest way to improve performance is to do less stuff. Have you looked at how much data is returned to the client per identify operation? You can see this info in the chrome dev tools network tab or in firefox/firebug's network tab. Also, showing a client features from 14 different layers is a bad idea from a user experience point of view...navigating 14 tabs to sort through information would be painful, IMO. Also, in this case, optimizing your JavaScript loop(s) is premature.
... View more
09-05-2012
04:25 PM
|
0
|
0
|
3351
|
|
POST
|
The easiest way to get help is to post code that reproduces the issue. Can you post a simple test page that shows the problem?
... View more
09-05-2012
09:18 AM
|
0
|
0
|
3534
|
|
POST
|
The ID for the text symbol bug is NIM080545. We're planning to fix in the next release (3.2) which should be out in a week or two. Watch the ArcGIS Blog's Developer feed for notification of when the release officially happens.
... View more
09-05-2012
09:16 AM
|
0
|
0
|
2347
|
|
POST
|
Hi Sam, esri.geometry.Extent.intersects does return an extent when an extent is passed to it and the two extents intersect. Here's a test case: http://jsfiddle.net/w45HY/ If you're not passing an extent to extent.intersects() (that is, you pass some other geometry type like Point or Polygon), you get a boolean back. Can you confirm that this works on your end? Edit: we'll update the docs to say that a boolean is returned if a non-extent geometry is passed to extent.intersects().
... View more
09-05-2012
07:53 AM
|
0
|
0
|
1130
|
|
POST
|
Can you provide an example? The JS used to create your symbol would be helpful, as well as the JSON sent to the print task.
... View more
09-05-2012
07:25 AM
|
0
|
0
|
2555
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-23-2012 07:54 AM | |
| 1 | 05-28-2010 08:31 AM | |
| 1 | 11-12-2012 08:12 AM | |
| 3 | 02-23-2012 10:57 AM | |
| 1 | 06-27-2011 08:51 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|