|
POST
|
Your popup templates, senateTemplate and houseTemplate, use specific fields. To see more attribute fields in your popup, modify your popup templates.
... View more
09-27-2012
07:39 AM
|
0
|
0
|
1041
|
|
POST
|
Thanks for the repro case that shows the issue, that makes this kind of thing so much easier to debug :). The issue is that your buttons are pushing the map down. Here's one possible fix: http://jsfiddle.net/RtSHP/ I added this in the style tag in the head:
#btnWrapper {
position: absolute;
z-index: 10;
top: 0px;
left: 30px;
}
And modified the markup for the map:
<div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
<div id="btnWrapper">
<div dojoType="dijit.form.Button" id="btnHouse" class="togglebutton" onClick="toggleLayer(1);">House Districts</div>
<div dojoType="dijit.form.Button" id="btnSenate"class="togglebutton" onClick="toggleLayer(0);">Senate Districts</div>
<div dojoType="dijit.form.Button" id="btnCongress"class="togglebutton" onClick="toggleBaseLayer(2);">Congressional Districts</div>
</div>
</div>
I didn't change any of the JavaScript.
... View more
09-26-2012
01:56 PM
|
0
|
0
|
1041
|
|
POST
|
You're on your own there. That being said, it's all JavaScript, nothing's stopping you from clobbering whatever you like.
... View more
09-26-2012
01:04 PM
|
0
|
0
|
2427
|
|
POST
|
You could make one to match the look and feel of your app pretty quickly...the generally accepted icon seems to be a dot with a dash next to it stacked a couple of times (on the off chance you know morse code, think letter A). A Google images search for "map legend icon" turns up a few results that might lead to more inspired icons... Take a look at the symbol for the legend in the Basic Viewer template: http://www.arcgis.com/apps/OnePane/basicviewer/images/Legend16.png There's also the legend icon from the sprite used by the Social Media template: http://www.arcgis.com/apps/SocialMedia/images/ui/uiSprite.png?v=3.01 (top row, second from the right).
... View more
09-26-2012
08:12 AM
|
0
|
0
|
1303
|
|
POST
|
Is that config setting (esri.config.defaults.geoRSSService) 'official'? (can't see it in the docs) We didn't doc it because the GeoRSS layer populates it automatically. The issue we're having now is that the GeoRSS layer is looking for the GeoRSS service at a URL that doesn't exist. This is what we're looking into fixing... hopefully the GeoRSS service will be at a URL expected by the GeoRSS service shortly. And then you won't have to manually populate this config option.
... View more
09-26-2012
07:54 AM
|
0
|
0
|
2427
|
|
POST
|
Hi Tracy, There are two onClick events firing: one from your map and another from your feature layer. Since your feature layer is set up with an info template, when a feature from that feature layer is clicked, that info template is used to display info in the popup. This is the default behavior for both feature layers and graphics layers. It's not that your map is "remembering" some previous selection, it's that when you click initially, there are no features in the feature layer and the click is handled by your map's onClick event listener. When you click a county that has been added to the feature layer, the feature layer's onClick handler kicks in and displays the feature's attributes using the infoTemplate you specified when you created the feature layer. If this is the app in its final state, the easy fix is to remove the infoTemplate from the countyFeatureLayer constructor.
... View more
09-26-2012
07:50 AM
|
0
|
0
|
909
|
|
POST
|
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.
... View more
09-26-2012
07:30 AM
|
0
|
0
|
2427
|
|
POST
|
Thanks for the heads up, we'll get this fixed shortly. Until then, manually specify the location of the GeoRSS service, here's a working example of the sample: <!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>???
... View more
09-26-2012
07:27 AM
|
0
|
0
|
2427
|
|
POST
|
I'm planning to look at this later this afternoon and will post back later today.
... View more
09-25-2012
11:12 AM
|
0
|
0
|
1362
|
|
POST
|
Thanks for the reply...one small sub-question...is there any getting started material for this API ? I am new beginner for this Java Script API ( I am familiar to Server and Desktop 10.0) Also I found that many people (Even I am also) customizing the sample code and using in our applications is that a correct way to get start ? Take a look at the "Getting Started" section of our conceptual help: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm Downloading and modifying the samples is also a good way to get started. As always your support is the outstanding in the world.. hats off to you all : ) Thanks!
... View more
09-25-2012
05:57 AM
|
0
|
0
|
1228
|
|
POST
|
You'll also want to add a <link> tag for esri.css. This is new with 3.2:
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css">
More info here: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/css.htm
... View more
09-25-2012
04:58 AM
|
0
|
0
|
1228
|
|
POST
|
Hi Aaron, Both of the Gauge samples we've published use dataFormat: "value" in the options for the Gauge(s). If you use dataFormat: "percentage", you get some ticks w/labels on the gauge. Here's an example: http://jsfiddle.net/NvVrj/ Does that fit with what you want to do?
... View more
09-24-2012
01:06 PM
|
0
|
0
|
911
|
| 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
|