Solved! Go to Solution.
<!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.2/js/dojo/dijit/themes/tundra/tundra.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" /> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } #map { margin: 0; padding: 0; } #meta { position: absolute; left: 20px; bottom: 20px; width: 20em; height: 5em; z-index: 40; background: #fff; color: #777; padding: 5px; border: 5px solid #575757; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; font-family: arial; font-size: 0.9em; } #meta h3 { color: #000; font-size: 1.1em; padding: 0px; margin: 0px; display: inline-block; } #loading { float: right; } </style> <script>var dojoConfig = { parseOnLoad: true };</script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/"></script> <script> dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); dojo.require("esri.layers.GeoRSSLayer"); var map; function init() { var ext = new esri.geometry.Extent({"xmin":-13112658,"ymin":5168591,"xmax":-11466510,"ymax":6145762,"spatialReference":{"wkid":102100}}); map = new esri.Map("map",{ extent: ext }); var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer"); map.addLayer(basemap); esri.config.defaults.geoRSSService = "http://www.arcgis.com/sharing/rss"; var georssUrl = "http://dl.dropbox.com/u/2654618/data-mixed.xml"; // other examples of GeoRSS feeds: // var georssUrl = "http://geocommons.com/overlays/188692.atom"; // U.S. Breweries in 2009 http://geocommons.com/overlays/188692 // var georssUrl = "http://geocommons.com/overlays/116926.atom"; // S.F. and East Bay Breweries http://geocommons.com/overlays/116926 var georss = new esri.layers.GeoRSSLayer(georssUrl); map.addLayer(georss); dojo.connect(georss, "onLoad", function() { dojo.style(dojo.byId("loading"), "display", "none"); // create an info template var template = new esri.InfoTemplate("${name}", "${description}"); // set the info template for the feature layers that make up the GeoRSS layer // the GeoRSS layer contains one feature layer for each geometry type var layers = georss.getFeatureLayers(); dojo.forEach(layers, function(l) { l.setInfoTemplate(template); }); }); dojo.connect(map, "onLoad", function() { //resize the map when the browser resizes dojo.connect(dijit.byId("map"), "resize", map,map.resize); }); } dojo.ready(init); </script> </head> <body class="tundra"> <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline',gutters:false" style="width: 100%; height: 100%; margin: 0;"> <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"> <div id="meta"> <span id="loading"><img src="http://dl.dropbox.com/u/2654618/loading_black.gif" /></span> <h3>Display GeoRSS on a map</h3> <br /> The map displays a simple GeoRSS file with points, lines and polygons. <div> </div> </div> </body> </html>???
<!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.2/js/dojo/dijit/themes/tundra/tundra.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" /> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; } #map { margin: 0; padding: 0; } #meta { position: absolute; left: 20px; bottom: 20px; width: 20em; height: 5em; z-index: 40; background: #fff; color: #777; padding: 5px; border: 5px solid #575757; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; font-family: arial; font-size: 0.9em; } #meta h3 { color: #000; font-size: 1.1em; padding: 0px; margin: 0px; display: inline-block; } #loading { float: right; } </style> <script>var dojoConfig = { parseOnLoad: true };</script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/"></script> <script> dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); dojo.require("esri.layers.GeoRSSLayer"); var map; function init() { var ext = new esri.geometry.Extent({"xmin":-13112658,"ymin":5168591,"xmax":-11466510,"ymax":6145762,"spatialReference":{"wkid":102100}}); map = new esri.Map("map",{ extent: ext }); var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer"); map.addLayer(basemap); esri.config.defaults.geoRSSService = "http://www.arcgis.com/sharing/rss"; var georssUrl = "http://dl.dropbox.com/u/2654618/data-mixed.xml"; // other examples of GeoRSS feeds: // var georssUrl = "http://geocommons.com/overlays/188692.atom"; // U.S. Breweries in 2009 http://geocommons.com/overlays/188692 // var georssUrl = "http://geocommons.com/overlays/116926.atom"; // S.F. and East Bay Breweries http://geocommons.com/overlays/116926 var georss = new esri.layers.GeoRSSLayer(georssUrl); map.addLayer(georss); dojo.connect(georss, "onLoad", function() { dojo.style(dojo.byId("loading"), "display", "none"); // create an info template var template = new esri.InfoTemplate("${name}", "${description}"); // set the info template for the feature layers that make up the GeoRSS layer // the GeoRSS layer contains one feature layer for each geometry type var layers = georss.getFeatureLayers(); dojo.forEach(layers, function(l) { l.setInfoTemplate(template); }); }); dojo.connect(map, "onLoad", function() { //resize the map when the browser resizes dojo.connect(dijit.byId("map"), "resize", map,map.resize); }); } dojo.ready(init); </script> </head> <body class="tundra"> <div data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline',gutters:false" style="width: 100%; height: 100%; margin: 0;"> <div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'"> <div id="meta"> <span id="loading"><img src="http://dl.dropbox.com/u/2654618/loading_black.gif" /></span> <h3>Display GeoRSS on a map</h3> <br /> The map displays a simple GeoRSS file with points, lines and polygons. <div> </div> </div> </body> </html>???
Question for ESRI - will the proxy components become part of AGS for those of us who have licenses and run local installs? (obviously the JS API will need to know which proxy to use if this does happen)
As I understand it, the services that convert KML -> JSON and GeoRSS -> JSON are part of Portal and are available to run on your local Intranet when you purchase a license for Portal.
Is that config setting (esri.config.defaults.geoRSSService) 'official'? (can't see it in the docs)
And then you won't have to manually populate this config option.
You're on your own there. That being said, it's all JavaScript, nothing's stopping you from clobbering whatever you like.