|
POST
|
As you know, the KMLLayer relies on a utility running on arcgis.com to convert a KML file to JSON. This utility reads the symbology from the KML file and creates renderers that are applied to the resulting feature layers. Once you have a reference to your feature layer(s), look at each layer's renderer property. In your example, the layer has a SimpleRenderer so it has a single symbol. Run this in the console after loading your example:
kml.getLayers()[0].renderer.symbol.width;
kml.getLayers()[0].renderer.symbol.color;
kml.getLayers()[0].renderer.symbol.declaredClass;
... View more
07-13-2012
05:55 AM
|
0
|
0
|
614
|
|
POST
|
Have you tried modifying one of the WMTS samples from the SDK to use your ArcGIS Server service? I do not know of a public AGS 10.1 WMTS service.
... View more
07-13-2012
05:48 AM
|
0
|
0
|
1546
|
|
POST
|
Gladly. Can you mark my post as an answer so this thread shows as answered?
... View more
07-11-2012
05:41 PM
|
0
|
0
|
1750
|
|
POST
|
How's this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" /> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title> </title> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dijit/themes/claro/claro.css"> <style type="text/css"> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } #map{ padding:0; } </style> <script type="text/javascript"> var djConfig = { parseOnLoad: true }; </script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script> <script type="text/javascript"> dojo.require("dijit.dijit"); // optimize: load dijit layer dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); //dojo.require("esri.virtualearth.VETiledLayer"); dojo.require("dijit.TitlePane"); dojo.require("esri.dijit.BasemapGallery"); dojo.require("esri.arcgis.utils"); function init() { var initExtent = new esri.geometry.Extent({ "xmin": -11727455, "ymin": 4861652, "xmax": -11706340, "ymax": 4871512, "spatialReference": { "wkid": 102100} }); var _map = new esri.Map("map", { extent: initExtent }); var initBasemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"); _map.addLayer(initBasemap); //Programmatic 2 - will produce empty //add bmg to programmatic contentpane _tp1 = new dijit.TitlePane({ title:"Programmatic 2", open: false }); basemapGallery3 = new esri.dijit.BasemapGallery({ showArcGISBasemaps: true, map: _map }, dojo.create("div")); basemapGallery3.startup(); // _tp1.setContent(_c1); _tp1.placeAt(dijit.byId("leftside").containerNode); _tp1.setContent(basemapGallery3.domNode); //resize the map when the browser resizes dojo.connect(dijit.byId('map'), 'resize', _map, _map.resize); } //show map on load dojo.addOnLoad(init); </script> </head> <body class="claro"> <div dojotype="dijit.layout.BorderContainer" design="sidebar" gutters="false" style="width:100%;height:100%;margin:0;"> <div id="leftside" dojotype="dijit.layout.ContentPane" region="left" style="width:200px;border:1px solid #000;padding:0;"> </div> <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000;padding:0;"> </div> </div> </body> </html>
... View more
07-11-2012
04:54 PM
|
0
|
0
|
1750
|
|
POST
|
Can you post a full page that reproduces the issue?
... View more
07-11-2012
03:42 PM
|
0
|
0
|
1750
|
|
POST
|
If I'm running an app from the IIS root folder and I am still getting the following console error: XMLHttpRequest cannot load http://server.arcgisonline.com/ArcGIS/rest/info?f=json. Origin http://<servername> is not allowed by Access-Control-Allow-Origin. Should I be concerned? What could be causing this? You can safely ignore that error. More info: http://forums.arcgis.com/threads/60386-Access-Control-Allow-Origin-and-3.0?p=208466&viewfull=1#post208466
... View more
07-11-2012
10:47 AM
|
0
|
0
|
3694
|
|
POST
|
Do you see it with our samples? Can you post a screen shot of what you're seeing?
... View more
07-10-2012
05:56 AM
|
0
|
0
|
825
|
|
POST
|
It looks like you're confusing the use of require and dojo.require. The former is the new, AMD style of loading modules and accepts and array of strings (and then passes them to an optional callback once all modules are loaded). The latter is the legacy way of loading modules and takes a single string argument.
... View more
07-09-2012
07:56 AM
|
0
|
0
|
517
|
|
POST
|
What have you tried? What errors are you seeing? Do you see the request going to the layer in your map service? Consider using 3.0 as it is the latest version of the API.
... View more
07-09-2012
07:22 AM
|
0
|
0
|
1944
|
|
POST
|
Hi all, I guess the main problem is that this new requirement (to use a web server) isn't documented anywhere. Eg, the Samples homepage still links to a video showing how to download a sample and run it from your local disk. None of the individual samples have been updated to list the requirement for a web server. The video shows using a local instance of IIS to run the sample. Notice that the html file is placed in the wwwroot directory (default location to serve files using IIS) and when it's loaded in the browser, the sample is accessed using http://, not file://.
... View more
07-09-2012
07:08 AM
|
0
|
0
|
3694
|
|
POST
|
Here's a high level overview: �??create a few arrays: one with layer ID's for editing, one with layer ID's for your legend, one that contains all of your layers �??pass the array of all layers to map.addLayers �??in the callback, use dojo.filter to create new arrays of layers you can pass to the Editor widget and the Legend widget by checking if a layer's ID is in the editing array or the legend array
... View more
07-06-2012
10:11 AM
|
0
|
0
|
1984
|
| 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
|