|
POST
|
You don't elaborate on the error that gets thrown. Is it a type mismatch? I ask because maybe the symbol you're passing for the graphic creation isn't compatible (point vs line, line vs polygon, etc). Perhaps in your highlightResults function, you can do something like this: markerSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_DIAMOND, 28,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
new dojo.Color([255,255,255]), 2),
new dojo.Color([255,0,0,0.85]));
lineSymbol = new esri.symbol.CartographicLineSymbol(esri.symbol.CartographicLineSymbol.STYLE_SOLID,
new dojo.Color([255,0,0]), 10, esri.symbol.CartographicLineSymbol.CAP_ROUND,
esri.symbol.CartographicLineSymbol.JOIN_MITER, 5);
fillSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
new dojo.Color([255,0,0]), 2),new dojo.Color([255,255,0,0.85]));
// figure out which symbol to use
var symbol, g;
if ( feature.geometry.type === "point" || feature.geometry.type === "multipoint") {
symbol = markerSymbol;
} else if ( feature.geometry.type === "line" || feature.geometry.type === "polyline") {
symbol = lineSymbol;
}
else {
symbol = fillSymbol;
}
g = new esri.Graphic(evt, symbol, null, null);
selGraphicsLayer.add(g);
... View more
09-27-2013
08:22 AM
|
0
|
0
|
1444
|
|
POST
|
ARGH!! I totally forgot about that part of the migration to the 3.x APIs. I removed the reference and all is well. THANK YOU!
... View more
09-26-2013
01:53 PM
|
0
|
3
|
4461
|
|
POST
|
The latest API version doesn't necessarily mean things will work in IE-8. All versions of IE before v9 are notorious for being NON-standards compliant which makes life a living hell for web developers. In my organization, IE-8 is still the default browser so I did have to ensure my application would work under IE-8. I ultimately switched my charting from a Dojo solution to another solution 3rd party solution because I could not get it to work under IE-8. Everything else worked fine- just not my charting. So- will v3.6 work? Probably, even most likely. You asked why someone would avoid IE-8 mode and this was one reason from my experience.
... View more
09-26-2013
01:19 PM
|
0
|
0
|
1682
|
|
POST
|
The header is a bit of a mess (this is one of my first webmap app efforts) because it tries to apply some responsive design to the page. EDIT: Forgot the actual error: dojo/parser:parse() error TypeError {} serverapi.arcgisonline.com/jsapi/arcgis/3.4/:34
... View more
09-26-2013
11:04 AM
|
0
|
0
|
4461
|
|
POST
|
Here's the rest: [HTML] <div id="content"> <figure class="post-image"> <div id="closureHeader" style="width=500px; height=400px"> <h4 class="widgettitle">Emergency Road Closure Information as of <SPAN id="todaysDate">today</SPAN>:</h4> <p>Please be advised that all state routes and highways are maintained and reported on by the Washington State Department of Transportation (WSDOT) and are <SPAN style="font-weight:bold">NOT</SPAN> reflected in the list below. They are, however, available as an additional overlay that can be turned on at your convenience. Please call the WSDOT automated information line at 511 or visit their website at <a href="http://www.wsdot.wa.gov" target="_blank">www.wsdot.wa.gov</a> for information related to Washington State DOT maintained state routes and highways.</p> </div> </figure> <article class="post clearfix"> <figure class="post-image"> <div dojotype="dijit.layout.BorderContainer" design="headline" gutters="false" style="width: 100%; height:400px; margin: 0;"> <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="width:100%; height:400px;overflow:hidden;border:1px solid #000"> <div style="position:absolute; right:5px; top:5px;z-index:99"> <button id="dropdownButton" iconClass="bingIcon" label="Switch Basemap" dojoType="dijit.form.DropDownButton"> <div dojoType="dijit.Menu" id="basemapMenu"> <!--The menu items are dynamically created using the basemap gallery layers--> </div> </button> </div> </div> </div> </figure> <p style="font-size:80%;text-align:right;font-style:italic;color:#666666">Map not big enough? <a href="http://dmc-arcgis/spwscc/rdClosures/rdClosuresFull.html" target="_blank">View a full screen version</a></p> </article> <figure class="post-image"> <div id="closureList" style="width:100%"> <h5>There are currently <SPAN id="numRdClosures">0</SPAN> road closures:</h5> <div dojotype="dijit.layout.ContentPane" id="dGridContentPane" region="center" style="width:100%;height:350px"> <table dojotype="dojox.grid.DataGrid" jsid="grid" id="grid" selectionMode="none"> <thead> <tr> <th field="OBJECTID" width="0%">OBJECTID</th> <th field="rdName" formatter="makeHtmlTable" width="100%">rdName</th> <th field="dateCl" width="0%">dateCL</th> <th field="dateOp" width="0%">dateOp</th> </tr> </thead> </table> </div> <hr> <div align="right"> <label>Sort Road List by</label> <select id="dgridSortOrder" class="select" align="right" title="Sort Road List by" onchange="changeSortOrder()" /> <option selected="true">Name <option>Closure Date (newest first) <option>Closure Date (newest last) <option>Re-Open Date (newest first) <option>Re-Open Date (newest last) </select></div> </div> </figure> <!-- /.post --> </div> <!-- /#content --> <aside id="sidebar"> <section class="widget"> <h4 class="widgettitle"><SPAN>Show Me..<a href="#" rel="toggle[layerList]" data-openimage="http://publicworks.snoco.org/RdClosures/images/chevron_up.png" data-closedimage="http://publicworks.snoco.org/RdClosures/images/chevron_down.png"><img id="layerImg" src="http://publicworks.snoco.org/RdClosures/images/chevron_down.png" align="right" style="margin-top:5px"/></a></SPAN></h4> <hr> <div id="layerList"> <table style="font-size:95%;margin-left:15px;"> <tbody> <tr> <td ALIGN="RIGHT"><b>Emergency Road Closures</b></td> <td><input id="closureBtn" type="checkbox" onclick="showRoadClosures()" name="roadClosures"></td> </tr> <tr> <td ALIGN="RIGHT"><b>Traffic Cameras</b></td> <td><input id="camBtn" type="checkbox" onclick="showWsdotWebcams()" name="trafficCams"></td> </tr> <tr> <td ALIGN="RIGHT"><b>Snow Removal Routes</b></td> <td><input id="removalBtn" type="checkbox" onclick="showSnowRemovalRoutes()" name="SnowRemoval"></td> </tr> <tr> <td ALIGN="RIGHT"><b>Anti-Icing Treatment Routes</b></td> <td><input id="icingBtn" type="checkbox" onclick="showAntiIcingRoutes()" name="AntiIcing"></td> </tr> <tr> <td ALIGN="RIGHT"><b>WSDOT Travel Alerts</b></td> <td><input id="wsdotBtn" type="checkbox" onclick="showWsdotAlerts()" name="wsdotAlerts"></td> </tr> <tr> <td ALIGN="RIGHT"><b>Stream Gages</b></td> <td><input id="gageBtn" type="checkbox" name="streamGages"></td> </tr> </tbody> </table> </div> </section> <!-- /.widget --> <section class="widget clearfix"> <h4 class="widgettitle"><SPAN>Map Legend<a href="#" rel="toggle[mapLegend]" data-openimage="http://publicworks.snoco.org/RdClosures/images/chevron_up.png" data-closedimage="http://publicworks.snoco.org/RdClosures/images/chevron_down.png"><img id="legendImg" src="http://publicworks.snoco.org/RdClosures/images/chevron_down.png" align="right" style="margin-top:5px"/></a></SPAN></h4> <hr> <div id="mapLegend"> <table style="font-size:80%;margin-left:15px;"> <tbody> <tr> <td ALIGN="CENTER"><img src="http://publicworks.snoco.org/RdClosures/roadClosed.png" width="24" height="24" style="height:24px;width:24px"></td> <td ALIGN="LEFT"><b>Closed Road Section</b></td> </tr> <tr> <td ALIGN="CENTER"><img src="http://publicworks.snoco.org/RdClosures/roadOpen.png" width="24" height="24" style="height:24px;width:24px"></td> <td ALIGN="LEFT"><b>Open Road Section</b></td> </tr> <tr> <td ALIGN="CENTER"><img src="http://publicworks.snoco.org/RdClosures/RdAdvisory.png" width="24" height="24" style="height:24px;width:24px"></td> <td ALIGN="LEFT"><b>Road Advisory</b></td> </tr> <tr> <td ALIGN="CENTER"><img src="http://maps.google.com/mapfiles/kml/shapes/webcam.png" width="24" height="24" style="height:24px;width:24px"></td> <td ALIGN="LEFT"><b>Traffic Camera Location</b></td> </tr> <tr> <td ALIGN="CENTER"><img src="http://publicworks.snoco.org/SWM/riverGageIcon01.png" width="24" height="24" style="height:24px;width:24px"></td> <td ALIGN="LEFT"><b>County Stream Gage</b></td> </tr> <tr> <td ALIGN="CENTER"><img src="http://publicworks.snoco.org/SWM/riverGageIcon02.png" width="24" height="24" style="height:24px;width:24px"></td> <td ALIGN="LEFT"><b>USGS Stream Gage</b></td> </tr> <tr> <td ALIGN="LEFT" COLSPAN="2" style="font-weight:bold;font-size:115%">Snow Removal/Anti-Icing:</td> </tr> <tr> <td ALIGN="CENTER"><hr style="width:20px;height:10px; color: #FF0000; background-color: #FF0000"></td> <td ALIGN="LEFT"><b>Priority Route</b></td> </tr> <tr> <td ALIGN="CENTER"><hr style="width:20px;height:10px;color: #FFFF00; background-color: #FFFF00"></td> <td ALIGN="LEFT"><b>Secondary Route</b></td> </tr> <tr> <td ALIGN="CENTER"><hr style="width:20px;height:10px;color: #33CCFF; background-color: #33CCFF"></td> <td ALIGN="LEFT"><b>Tertiary Route</b></td> </tr> </tbody> </table> </div> </section> <!-- /.widget --> </aside> <!-- /#sidebar --> <footer id="footer"> <table cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td class="SWMDAT_header1">Snohomish County Road Information</td></tr> <tr> <td align="left" valign="top"><div class="SWMDAT_text_pad"> <ul> <li><a href="http://www1.co.snohomish.wa.us/Departments/Public_Works/Services/Roads/roadsupdate.htm">Road Construction Updates</a></li> <li><a href="http://www1.co.snohomish.wa.us/Departments/Public_Works/Divisions/Road_Maint/Road_Closures.htm">Long Term, Weight-Restricted, and Seasonal Road Closures</a></li> <li><a href="http://www.co.snohomish.wa.us/PWApp/SWM/floodwarn/index.html">Real-Time Flood Warning Information</a></li> </ul> </div></td></tr> <tr> <td align="left" valign="top"><div class="SWMDAT_text_pad"> <b>DISCLAIMER:</b> This data is accurate at the time entered and does not necessarily represent current "up to the minute" conditions. Conditions can change rapidly during storms and flooding. Drivers are encouraged to exercise extreme caution and allow extra time. Road flooding or closures may occur between the time you view this data and you arrive at a particular road. Never drive through a road with standing water. Do not get out of your vehicle and approach downed trees or power lines. </div></td></tr> </table> </footer> <!-- /#footer --> </div> <!-- /#pagewrap --> </body> </html>[/HTML]
... View more
09-26-2013
11:01 AM
|
0
|
0
|
4461
|
|
POST
|
Here's the HTML header and part of the HTML body: [HTML]<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta content="Snohomish County Road Maintenance" name="Author"> <meta id="MetaKeywords" content="snohomish county road map closure closures conditions puget sound information" name="Keywords"> <meta id="MetaDescription" content="Snohomish County Emergency Road Closures Map. View road closures in Snohomish County on a map." name="Description"> <meta content="County" name="govType"> <!-- disable iPhone inital scale --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Snohomish County Emergency Road Closures</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <!-- Pre-Internet Explorer Version 9 browsers require some hacks to display CSS3 content --> <!-- correctly so detect for that and load a seperate CSS style sheet if discovered. --> <!--[if lt IE 9]> <script type="text/javascript" src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> <!--<![endif]--> <!--[if lt IE 9]> <link href="css/style-preIE9.css" rel="stylesheet" type="text/css"> <!--<![endif]--> <!--[if lt IE 9]> <script type="text/javascript" src="js/modernizr.js"></script> <!--<![endif]--> <!-- Load the normal CSS style file for non IE browsers and IE version 9 and above --> <!--[if gt IE 8]> <link href="css/style.css" rel="stylesheet" type="text/css"> <!--<![endif]--> <link href="css/style.css" rel="stylesheet" type="text/css"> <!-- Main CSS and Media Queries CSS --> <link href="css/media-queries.css" rel="stylesheet" type="text/css"> <link rel="stylesheet" type="text/css" media="screen" href="http://www.devslide.com/public/labs/browser-detection/browser-detection.css" /> <script type="text/javascript" src="js/browser-detection.js"></script> <link href="http://www.co.snohomish.wa.us/PWApp/SWM/toolbar/swm_datatoolbar.css" type="text/css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/dijit/css/Popup.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css" /> <link rel="stylesheet" type="text/css" href="css/Grid.css"> <script type="text/javascript"> var dojoConfig = { parseOnLoad: true }; </script> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script> <script type="text/javascript" src="js/moment_min.js"></script> <script type="text/javascript" src="js/animatedcollapse.js"> /*********************************************** * Animated Collapsible DIV v2.4- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice MUST stay intact for legal use * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more ***********************************************/ </script> <script type="text/javascript" src="js/wsdotImportFunction.js"></script> <script type="text/javascript" src="js/mapFunctions.js"></script> <script type="text/javascript"> animatedcollapse.addDiv('layerList', 'fade=1,hide=1'); animatedcollapse.addDiv('mapLegend', 'fade=1,hide=1'); animatedcollapse.ontoggle=function($, divobj, state){ //fires each time a DIV is expanded/contracted //$: Access to jQuery //divobj: DOM reference to DIV being expanded/ collapsed. Use "divobj.id" to get its ID //state: "block" or "none", depending on state }; animatedcollapse.init(); dojo.ready(initMap); </script> </head> <body class="claro"> <div id="pagewrap"> <header id="header"> <!-- ------------ START PAGE DIV AND TABLE FRAME ------------ --> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="SWMDAT_page_frame" align="center" border="0"> <!-- --------------- START SNOCO SWM BANNER ----------------- --> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td valign="top" colspan="2"> <img src="http://www.co.snohomish.wa.us/PWApp/SWM/toolbar/banner_homepage_02.gif" width="100%" alt="black_wave.gif" /> </td> </tr> <tr> <td valign="top" align="left"> <img src="http://www.co.snohomish.wa.us/PWApp/SWM/toolbar/appl_banner_w_logline_SnoCoTitleOnly.gif" alt="Snohomish County Online Government Information & Services" /> </td> <td valign="top" align="center" width="538"> <span id="SWMDAT_snocolinks"> <a href="http://www1.co.snohomish.wa.us/">Snohomish County</a> > <a href="http://www1.co.snohomish.wa.us/Departments/Public_Works/">Public Works</a> > <a href="http://www1.co.snohomish.wa.us/Departments/Public_Works/Services/Roads/">Roads</a></span> <br /> <div id="SWMDAT_title">Emergency Road Closure Information</div> Updated every 15 minutes </td> </tr> </table> <!-- ---------------- END SNOCO SWM BANNER ------------------ --> <!-- --------------- START SWM APPS TOOL BAR ---------------- --> <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr> <td class="SWMDAT_secondbar" align="left" style="width: 250px"> <strong>Report Changes to: 425-388-7500</strong> </td> <td class="SWMDAT_secondbar" align="right"> <a href="mailto:[email protected]">Contact Road Maintenance</a> </td> </tr> </table> <!-- ---------------- END SWM APPS TOOL BAR ----------------- --> </td> </tr> </table> </header> <!-- /#header -->[/HTML]
... View more
09-26-2013
11:00 AM
|
0
|
0
|
4461
|
|
POST
|
Apparently my HTML markup is over the 10k character limit for posts so I'm going to break it out over a couple posts in this thread. The initMap function I call within dojo.Ready is located in my mapFunctions.js file. That's also where all my dojo.require statements are. Here's that stuff: //=============================================================================
// Global declarations and dependencies
//=============================================================================
dojo.require("esri.graphic");
dojo.require("esri.map");
dojo.require("esri.dijit.BasemapGallery");
dojo.require("esri.dijit.InfoWindow");
dojo.require("esri.dijit.Popup");
dojo.require("esri.dijit.Scalebar");
dojo.require("esri.layers.FeatureLayer");
dojo.require("esri.layers.KMLLayer");
dojo.require("esri.tasks.query");
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.form.Button");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.Menu");
dojo.require("dojo.date.locale");
dojo.require("dojo.parser");
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.data.ItemFileReadStore");
var rdClosuresShown = 1;
var trafficCamShown = 0;
var streamGageShown = 0;
var snowRoutesShown = 0;
var iceRemovalShown = 0;
var wsdotAlertsShown = 0;
var rdClosureWdgt;
var trafficCamWdgt;
var snowRteWdgt;
var icingRteWdgt;
var gageWdgt;
var wsdotWdgt;
var map;
var mapLayers = [];
var popup, template;
var wsdotTemplate;
var theBasemap, theFeatureLayer, theCountiesLayer;
var basemapGallery;
var theSnowRemovalLayer, theWsdotCamLayer, theWsdotAlertLayer;
var initExtent;
//Update today's date on the webpage
var dToday = new Date().toLocaleDateString();
var SERVERPATH = "http://...";
//=============================================================================
// Main routine for initializing the Map
//=============================================================================
function initMap() {
.
.
.etc
}
... View more
09-26-2013
10:59 AM
|
0
|
0
|
4461
|
|
POST
|
I'm revisiting an application I started putting together using the 2.8 API. I'm not quite ready for AMD dojo so I was updating the API version to 3.4 but now I get a dojo parse error pretty much as the page loads. The error points to the API but I realize that's not the true source of the issue. While reading some of the documentation about dojo.parser, I got the impression that it's focused on the HTML side of your development and not necessarily the javascript code that you write. Is this correct? I don't have a ton of dojo items (borderContainer, ContentPane, BasemapMenu, DataGrid) so it shouldn't be this hard to figure it out but I'm having a hell of a time doing so. Should I be focusing my attention on the HTML markup or my javascript code? I've tried setting a breakpoint on the first line of code in my init() function but the parse error already fires before the code execution hits the breakpoint. Thanks! Steve
... View more
09-26-2013
10:10 AM
|
0
|
12
|
13156
|
|
POST
|
FINALLY! Thanks, Jason for catching that. After making the change, everything works like I want it to. Sometimes it certainly pays to have another set of eyes! Thanks again.
... View more
09-20-2013
01:32 PM
|
0
|
0
|
1414
|
|
POST
|
I have an application that I'm trying to extend by adding the ability for my users to add a graphic point, line, or polygon and then use that graphic as part of some analysis that I've developed. I'm using this sample's code as the basis for my code to add a user drawn graphic. This all worked fine when it was just adding the graphic to the default map graphics layer. Because I wanted to have popups for the graphics that a user adds, I decided that I wanted to create a graphicsLayer to house any user drawn graphics. I've defined the graphicsLayer this way: var graphicsTemplate = new esri.InfoTemplate(); graphicsTemplate.setTitle('Custom Project'); graphicsTemplate.setContent(graphicsLayerContent); //Define the Graphics Layer which contains the user drawn "projects" theGLayer = new esri.layers.GraphicsLayer({ id: "gLayer", opacity:0.80, visible:true }); theGLayer.setInfoTemplate(graphicsTemplate); map.addLayer(theGLayer); Within my application, I've set things up to basically operate like the ESRI sample I linked above. My function to add the graphic that the user draws is the following: function addGraphic(evt) { //deactivate the toolbar and clear existing graphics tb.deactivate(); map.enableMapNavigation(); theGLayer.clear(); //map.graphics.clear(); // figure out which symbol to use var symbol, g; if ( evt.type === "point" || evt.type === "multipoint") { symbol = markerSymbol; } else if ( evt.type === "line" || evt.type === "polyline") { symbol = lineSymbol; } else { symbol = fillSymbol; } attributes = {"ProjTitle": dojo.attr("intPrjName","value"),"projLimits": dojo.attr("intPrjLimits","value")}; g = new esri.Graphic(evt, symbol, attributes, null); theGLayer.add(new esri.Graphic(g)); //map.graphics.add(new esri.Graphic(evt, symbol)); } My code throws no errors and adds a graphic to the graphicsLayer (theGLayer.graphics.length =1) but it isn't visible. If I add a point, the X,Y coordinates of the stored graphic point match the X,Y coordinates of the evt object and the spatialReference of the graphic matches the spatialReference of the map. Everything tells me that the layer is visible but I don't see my graphics when I add them. What am I missing?? Thanks! Steve
... View more
09-20-2013
01:11 PM
|
0
|
3
|
1933
|
|
POST
|
I believe you'll need to use a GeometryService to project the webMercator extent into the projection of your choice. Maybe this sample will steer you in the right direction: Project A Point
... View more
09-17-2013
11:21 AM
|
0
|
0
|
1014
|
|
POST
|
The process would be something like this: Create a new popup / infoWindow for your app as shown in all the examples For each layer that needs a popup, create an infoTemplate and then specify it during the layer creation Create on onClick event listeners (dojo.connec in legacy Dojo) for each layer which contains a query on the layer Here's some cobbled together legacy code (v3.3 of the API) as a guide: var usgsTemplate = new esri.InfoTemplate();
usgsTemplate.setContent('<table cellspacing=\"5\" style=\"font-size:90%\"><tr><td style=\"text-align:top\"><b>Gage Location:</b></td><td style=\"vertical-align:top\">${NAME}</td></tr><tr><td style=\"vertical-align:top\"><b>Latest Graph:</b></td><td style=\"vertical-align:top\"><a href=\"${url}\" target=\"_blank\">Click to View<\a></td></tr></table>');
usgsTemplate.setTitle('USGS Stream Gage');
var floodplainTemplate = new esri.InfoTemplate();
floodplainTemplate.setContent(setFloodplainPopupContent);
floodplainTemplate.setTitle('100-Year Floodplain');
popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))
}, dojo.create("div"));
// Create the map
map = new esri.Map("map", {
extent:initExtent,
minScale: 4750000,
basemap: 'streets',
infoWindow:popup,
outFields: ["*"]
});
theUsgsLayer = new esri.layers.FeatureLayer(SERVERPATH + "/hydrography/swmStreamGages/MapServer/0", {
id: 'usgsGageLayer',
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate:usgsTemplate,
outFields: ["*"],
visible: true
});
theFloodplainLayer = new esri.layers.FeatureLayer(SERVERPATH + "/environmental/femaFloodPlain/MapServer/0", {
id: 'femaFloodplainLayer',
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate:floodplainTemplate,
outFields: ["*"],
opacity:0.35,
visible: false
});
.
. //Later on in the init() function...
.
.
//Listener event for feature selection and the popup info widow
dojo.connect(theUsgsLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theUsgsLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.resize(350,300);
map.infoWindow.setFeatures([deferred]);
map.infoWindow.show(evt.mapPoint);
});
//Listener event for feature selection and the popup info widow
dojo.connect(theFloodplainLayer,"onClick",function(evt){
//Listener event for feature selection and the popup info widow
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,15);
var deferred = theFloodplainLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.resize(200,175);
map.infoWindow.setFeatures([evt.graphic]);
map.infoWindow.show(evt.mapPoint);
});
Hope that points you in the right direction. You can also search the forum for identifyTask an popup/infoWindow and you might find some other examples. Good luck! Steve
... View more
09-04-2013
01:57 PM
|
0
|
0
|
855
|
|
POST
|
Unlike ArcGlobe which uses disk caching, ArcScene's performance is strictly tied to the computer's physical memory. In addition to a beefy graphics card, I would also max out the memory in the PC's motherboard (12-16Gb).
... View more
09-04-2013
11:15 AM
|
0
|
0
|
1103
|
|
POST
|
Maybe I'm misunderstanding your issue but I was able to draw a polyline using the tool under the "Draw/Buffer Shapes" pane and buffer it using your site under IE-8 (see attached screenshot). Steve
... View more
08-23-2013
03:12 PM
|
0
|
0
|
1215
|
|
POST
|
I seem to recall Derek mentioning in a JavaScript API session at the ESRI UC this year that they are looking towards developing something that only loads what your code requires. No timelines, of course..
... View more
08-21-2013
02:17 PM
|
0
|
0
|
1189
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | yesterday | |
| 1 | yesterday | |
| 1 | yesterday | |
| 1 | Wednesday | |
| 1 | a month ago |