|
POST
|
Charles, I think you need to actually specify your layer names in the visible layers (1 & 2 do not exist). Get your layer names from the capabilities file http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?service=wms&version=1.1.1&request=GetCapabilities The following code works in the sandbox (http://developers.arcgis.com/javascript/sandbox/sandbox.html) <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--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>Map with WMS</title> <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"> <style> html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; } </style> <script src="http://js.arcgis.com/3.9/"></script> <script> var map; require([ 'esri/map', 'esri/layers/WMSLayer', 'esri/layers/WMSLayerInfo', 'esri/geometry/Extent', 'dojo/_base/array', 'dojo/dom', 'dojo/dom-construct', 'dojo/parser', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'dojo/domReady!' ], function(Map, WMSLayer, WMSLayerInfo, Extent, array, dom, domConst, parser) { parser.parse(); map = new Map('map', { basemap: 'streets', center: [-96, 37], zoom: 4 }); var layer1 = new WMSLayerInfo({}); var resourceInfo = { extent: new Extent(-126.40869140625, 31.025390625, -109.66552734375, 41.5283203125, { wkid: 4326}), layerInfos: [layer1] }; var wmsLayer = new WMSLayer('http://nowcoast.noaa.gov:80/wms/com.esri.wms.Esrimap/obs?', { resourceInfo: resourceInfo, visibleLayers: ['world_countries_label','world_countries','RAS_RIDGE_NEXRAD','OBS_MET_TEMP'], }); wmsLayer.version = "1.1.1"; map.addLayers([wmsLayer]); }); </script> </head> <body class="claro"> <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'" style="overflow:hidden;"> </div> </div> </body> </html> Regards Anthony
... View more
06-30-2014
05:44 AM
|
0
|
0
|
2487
|
|
POST
|
All, Does anybody know how I can extend the WMS layer to use the style parameter? It appears I cannot get to the base WMS class. Regards Anthony
... View more
06-27-2014
12:52 AM
|
0
|
0
|
764
|
|
POST
|
Chris, ListDataFrames always returns a Python list object even if only one data frame is returned. In order to return a DataFrame object, an index value must be used on the list (e.g., df = arcpy.mapping.ListDataFrames(mxd)[0] The [0] means return the first item in the array. The * (wildcard) means return all layers, eg: Wildcards are used on the name property and are not case sensitive. A wildcard string of "so*" will return a layer with the name Soils. Wildcards can be skipped in the scripting syntax simply by passing an empty string (""), an asterisk (*), or entering wildcard=None, or nothing at all if it is the last optional parameter in the syntax. So essentially the code is creating an array of all the layer names in the data frame called "Layers". It then loops through each of these to see it the name matches one of those you wish to turn off. I'm not sure why there is an extra , ListDataFrames function df = arcpy.mapping.ListDataFrames(, mxd, "Layers")[0] It should probably read: df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] Regards Anthony
... View more
06-26-2014
03:30 AM
|
0
|
0
|
2435
|
|
POST
|
Tim, What error are you getting? I cannot see anything obviously wrong in your config. Just a check you do have your objectid and shape fields turned on for your layer in the service. Also if you want a wildcard search your expression needs to use the like statement: <expression>SBWR_ID LIKE '%[value]%'</expression> Regards Anthony
... View more
06-26-2014
03:18 AM
|
0
|
0
|
800
|
|
POST
|
No I don't think so, you can send feedback to the email address [email protected] Regards Anthony
... View more
06-25-2014
02:38 PM
|
0
|
0
|
1172
|
|
POST
|
Mark, Version 1.3 is the only one I know that used version 3 of the sdk but I think that may have even been 3.5. https://developers.arcgis.com/flex/guide/migrating-to-2-x.htm I don't think you can even get that version on the download site now: http://www.esri.com/apps/products/download/#ArcGIS_API_for_Flex Why do you need to use such an old version? Regards Anthony
... View more
06-25-2014
02:21 PM
|
0
|
0
|
1986
|
|
POST
|
Gerald, You can change the <maxlocations> Tag in the widget config to return more locations, if you set this to more than 6 which is the default a scroll bar will display Regards Anthony
... View more
06-25-2014
01:15 PM
|
0
|
0
|
603
|
|
POST
|
Esri China, still seems to have links to download: http://support.esrichina-bj.cn/2011/0223/960.html Regards Anthony
... View more
06-25-2014
09:46 AM
|
0
|
0
|
566
|
|
POST
|
Andrew, Info from the service: http://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9 Metadata: This service is metadata-enabled. With the Identify tool in ArcMap or the World Imagery with Metadata web map (http://www.arcgis.com/home/webmap/viewer.html?webmap=c1c2090ed8594e0193194b750d0d5f83), you can see the resolution, collection date, and source of the imagery at the location you click. The metadata applies only to the best available imagery at that location. You may need to zoom in to view the best available imagery. Regards Anthony
... View more
06-24-2014
01:20 PM
|
0
|
0
|
834
|
|
POST
|
Naren, I can't see anywhere on the documentation that says it will interact with the flex api. It is based around the javascript api. The services are coming from an ArcGIS Server so in theory you should be able to but you need to generate a token to access the maps, they may also not have a cross domain file on their sever to allow you to do so. Regards Anthony
... View more
06-24-2014
12:22 AM
|
0
|
0
|
1390
|
|
POST
|
I can get an esri base map to overlay on top of onemap but it does not work the other way round I think it may be a projection problem, try the following code in the javascript sandbox: http://developers.arcgis.com/javascript/sandbox/sandbox.html
<!DOCTYPE html>
<html>
<head>
<script type='text/JavaScript' src='http://www.onemap.sg/API/JS?accessKEY=xkg8VRu6Ol+gMH+SUamkRIEB7fKzhwMvfMo/2U8UJcFhdvR4yN1GutmUIA3A6r3LDhot215OVVkZvNRzjl28TNUZgYFSswOi'></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Simple Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #FFF;
overflow: hidden;
font-family: "Trebuchet MS";
}
</style>
<script src="http://js.arcgis.com/3.9/"></script>
<script language="JavaScript" type="text/JavaScript">
var map;
var centerPoint="28968.103,33560.969";
var myLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
myLayer.opacity = 0.5;
var OneMap = new GetOneMap('map','SM',{level:7,center:centerPoint,layer:myLayer}); //add one map here
function init() {
map=OneMap.map;
dojo.connect(OneMap.map, "onExtentChange", showExtent);
}
dojo.addOnLoad(init);
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
Regards Anthony
... View more
06-23-2014
11:53 PM
|
0
|
0
|
3282
|
|
POST
|
Naren, I can get an esri base map to overlay on top of onemap but it does not work the other way round I think it may be a projection problem, try the following code in the javascript sandbox: http://developers.arcgis.com/javascript/sandbox/sandbox.html
<!DOCTYPE html>
<html>
<head>
<script type='text/JavaScript' src='http://www.onemap.sg/API/JS?accessKEY=xkg8VRu6Ol+gMH+SUamkRIEB7fKzhwMvfMo/2U8UJcFhdvR4yN1GutmUIA3A6r3LDhot215OVVkZvNRzjl28TNUZgYFSswOi'></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Simple Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
body {
background-color: #FFF;
overflow: hidden;
font-family: "Trebuchet MS";
}
</style>
<script src="http://js.arcgis.com/3.9/"></script>
<script language="JavaScript" type="text/JavaScript">
var map;
var centerPoint="28968.103,33560.969";
var myLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
myLayer.opacity = 0.5;
var OneMap = new GetOneMap('map','SM',{level:7,center:centerPoint,layer:myLayer}); //add one map here
function init() {
map=OneMap.map;
dojo.connect(OneMap.map, "onExtentChange", showExtent);
}
dojo.addOnLoad(init);
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
Regards Anthony
... View more
06-23-2014
11:51 PM
|
0
|
0
|
1390
|
|
POST
|
Tim, Have you looked at Roberts link list widget: http://www.arcgis.com/home/item.html?id=df56092010f043589b6847b3f9cf0947 Regards Anthony
... View more
06-21-2014
01:39 AM
|
0
|
0
|
1115
|
|
POST
|
Travis, The time it takes for your layers to draw in ArcMap will directly effect the time it takes to draw from your web service. Does your layer take a long time to draw when displayed in ArcMap, if it does try setting scale thresholds or definition queries to speed up the drawing. If this does not help it may be just that your machine is struggling. Please don't forget to mark the original question as answered. Regards Anthony
... View more
06-20-2014
01:56 AM
|
0
|
0
|
1290
|
|
POST
|
Are you sure the Singapore map is in the same projection as the basemaps (i.e Web Mercator). If you watch the network traffic when using the online viewer the call to the Singapore map is different to the call to the normal basemaps, see attached Regards Anthony
... View more
06-20-2014
12:57 AM
|
0
|
0
|
3283
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-01-2016 01:57 PM | |
| 1 | 02-04-2013 01:05 AM | |
| 1 | 04-11-2013 09:53 PM | |
| 1 | 04-03-2013 09:42 AM | |
| 1 | 07-25-2014 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|