|
POST
|
@Rene Rubalcava I'm still getting errors with some of the variables such as the map being undefined and errors with locator.addresstoLocations(options) saying TypeError: x.toJson is not a function. Any tips?
... View more
02-19-2015
06:18 AM
|
0
|
4
|
3420
|
|
POST
|
@odoe Any suggestions on how to pass an address in URL parameter to zoom to in one of ESRI's web map JavaScript templates? (Such as the public information template: Esri/public-information-map-template-js · GitHub ) Within the public information template, the code would have to be saved in the main.js. Since I can't add the above code into the index.html, how can I modify the code above to work in a javascript page? I get an error when I add "map.on("load", function() { " to main.js.
... View more
02-18-2015
07:25 PM
|
0
|
6
|
3420
|
|
POST
|
Hi Mike. Thanks for your response. The data source of both layers: They were both saved in the same mxd in ArcMap 10.2.1. The layers were saved in the order I want them to display. Then I published the mxd as a dynamic web service. Versions: The ArcGIS Rest Services Directory link for these layers says that the current version is 10.11. ArcGIS Server Manager 10.1.1. I hope this is enough information. I'm not sure if this helps, but I just discovered another issue. The first layer is a point shape and the second layer is a polygon shape. For some reason while using the web map, when the first and second layer overlap, and the user clicks one of the points first, the polygon feature is highlighted first (although the point feature is on top of it); therefore, its popup is showing up first.
... View more
08-06-2014
11:02 AM
|
0
|
1
|
711
|
|
POST
|
I'm having an issue with my popup in my map made using ArcGIS online. One of my group layers contain 4 layers. When I turn all of the layers in this group layer off, the second layer's popup still displays when I click on the map. Does anyone know why this is happening? Also, for some reason, when I have all the layers in this group layer turned on, the second layer's pop up (polygon feature) shows before the 1st layer's popup (a point layer). How do I get the first layer's pop-up to show up first before the second layers? I thought the order the layers were displayed in impacted the order the pop ups are showed in.
... View more
08-06-2014
07:59 AM
|
0
|
3
|
2878
|
|
POST
|
I want to add a a dojo stacked column chart to my InfoWindow (not pop up) that displays when a user clicks on a county in my map. The chart is based on land use information in each county layer from 3 different years. I'm using this ESRI tutorial to customize my javaScript code: http://developers.arcgis.com/javascript/samples/widget_formatInfoWindow/ Here is a link to my sample fiddle with the code I need help with: http://jsfiddle.net/jr_js_dev/HzUC7/1/ Issues: My county Feature layer shows sometimes and doesn't show other times. Does anyone know why? When I enter in the sample layer from ESRI, the ESRI layer shows(http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/3"). But when I switch back to my layer, it doesn't show. (I checked, and the REST service for the layer I want works.) When my layer does show, I am able to click on a county, and an InfoWindow shows up with data based on the county layer and content set in the InfoTemplate. However, the stacked chart doesn't show up in the InfoWindow in the "chartNode" div I created for it. Anyone know how to get the chart to show in the InfoWindow? Note: I created a test stacked column chart with sample data that displays how I want my chart to look in the InfoWindow as a example.
... View more
07-17-2014
10:00 AM
|
0
|
0
|
678
|
|
POST
|
Can you post your full code? (Or at least your body code?) ETA: Not sure if this will help, but my css/layout.css code includes this:
html,body {
height:100%;
width:100%;
padding:0;
margin:0;
overflow:hidden;
}
body {
background-color:#fff;
color:#333;
font-size:14px;
overflow:hidden;
font-family:Georgia, "Times New Roman", Times, serif;
}
... View more
07-02-2014
08:20 AM
|
0
|
0
|
801
|
|
POST
|
Anyone know how to use the the StackedColumns chart in dojo for ArcGIS JavaScript API? I need to add a stacked chart to my popup window. I can only find the documentation below regarding using charts: https://developers.arcgis.com/javascript/jshelp/intro_popuptemplate.html http://dojotoolkit.org/documentation/tutorials/1.6/charting/ But it doesn't tell you how to add the different fields needed for the stacked columns (or stacked charts in general). Any ideas? Here is a snippet of the code I tried, but can't get the stacked chart to display:
var popupTemplate = new PopupTemplate({ title: "City: " + "{CITY}", description: "View PDF ",
mediaInfos: [{
type: "StackedColumns",
value: {
fields: ["Series A", ("Geo70", "Geo03", "Geo10"), "Series B", ("Par70", "Par03", "Par10")],
theme:"Julie"
}
}],
showAttachments: false
}); Then my featureLayer code is listed next with a link to the service and all the outfields listed above, and the addLayer function. A chart displays if I change my type to "piechart" or one of the other charts that has simple requirements.
... View more
07-01-2014
05:48 AM
|
0
|
0
|
1141
|
|
POST
|
I've been trying to read through the ArcGIS JavaScript API but can't find what I want. I have a web map on my page that is based on my my map stored on ArcGIS online. I want to create an if/else statement that does different things based on the value of a field in the layer. But I'm having a hard time accessing the field of the layer I want. Here is part of the JavaScript in my HTML code. var exLayer = actualmap.getLayer(actualmap.layerIds[6]).layerInfos[0];
console.log(exLayer); With the code above, I am able to access the layer I want in my web map. The web service I want is number 6 on the AGOL map, and the layer I want on this web service is number 0. I'm trying to access the field in layer 0 called "TID", and I want to get the rows with "TID" > 0 and rows "TID" = 0 for my if/else statement. I tried the below to access field names, but it didn't work. It just gave me the layer name. var test1 = Field(exLayer).name;
console.log(test1); Any suggestions?
... View more
06-27-2014
11:43 AM
|
0
|
1
|
651
|
|
POST
|
Ok, I got it to work, but you have to reformat your code a little bit differently. Not sure why though. I used the dojo/ready and dojo/parser methods? to make it work. Maybe it's required when using an AGOL map? I wish they would show more sample code with AGOL map examples. Links about dojo/ready and dojo/parser here that may help with understanding: dojo/ready dojo/parser <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Locate Button and WebID</title> <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; } #LocateButton { position: absolute; top: 95px; left: 20px; z-index: 50; } </style> <script src="//js.arcgis.com/3.9/"></script> <script> var geoLocate; require([ "dojo/parser", "dojo/ready", "esri/map", "esri/arcgis/utils", "esri/dijit/LocateButton", "dojo/domReady!" ], function (parser, ready, Map, arcgisUtils, LocateButton) { //create a map and instance of geoLocator and other widgets here ready(function(){ parser.parse(); { arcgisUtils.createMap("4778fee6371d4e83a22786029f30c7e1", "mapDiv").then(function (response) { var actualmap = response.map; geoLocate = new LocateButton({ map: actualmap, scale: 11, useTracking: true }, "LocateButton"); geoLocate.startup(); }); }})}); </script> </head> <body> <div id="mapDiv" class="map"> <div id="LocateButton"></div> </div> </body> </html>
... View more
06-26-2014
06:17 AM
|
0
|
0
|
1191
|
|
POST
|
Under "geoLocate = new LocateButton({", try changing map: mapDiv, to map:map, I think you are referencing the wrong variable which is why the LocateButton isn't working. "mapDiv" is the name of the div container which holds the map, not the map itself. This is why I hate that ESRI uses map as variable names in their examples, when "map" is a reserved word for some objects. It gets confusing. Your map variable is called "map." Maybe name it something else so it's less confusing. I like using "acutalmap." (Again, I think. I'm still new at this stuff.)
... View more
06-26-2014
05:26 AM
|
0
|
0
|
1191
|
|
POST
|
Not sure if this will help, but shouldn't there be a comma between var map and var geoLocate?
... View more
06-25-2014
12:32 PM
|
0
|
0
|
1191
|
|
POST
|
I think this thread should have died right here. Instead, you folks keep discussing how to violate license terms. SMH. 4.2 (h) seems to be the appropriate section in the linked version of the agreement. Must have been updated since Erwin posted. @burrito_mike, Why does ESRI give us the option to turn off the logo (logo:false) in the ArcGIS JavaScript API if it against their license terms? Even more, in their basic Web Map Application Template that you can download from ArcGIS online, they provide you with code to replace the ESRI logo with your own logo.
... View more
06-25-2014
07:40 AM
|
0
|
0
|
1102
|
|
POST
|
It's now showing and moving when I change numbers! I had to set the logo back to true. When logo was false, my logo would not show. Now, I have to play with the settings to get it in the right position. I'm just using the #mapDiv .logo-med CSS stylesheet suggested above and #mapDiv in my body for anyone who needs help with this in the future. Thanks everyone!
... View more
06-20-2014
11:58 AM
|
0
|
0
|
1102
|
|
POST
|
Ok, here's my append code in the last part of my body html: <script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script type="text/javascript">
$("#mapDiv_root").append($('<div id ="logo"></div>'));
</script> In header: <style type="text/css">
div.mapDiv_root #logo {
display: inline-block;
position: absolute;
height: 36px;
width: 46px;
right: 5px;
bottom: 5px;
z-index: 30;
background-image: url('logo.png');
cursor: pointer;
}
</style> (Logo url was shortened.) Part of Body section: [HTML]<body class="calcite app-loading"> <!--The ArcGIS API for JavaScript provides bidirectional support. When viewing the application in an right to left (rtl) language like Hebrew and Arabic the map needs to remain in left-to-right (ltr) mode. Specify this by setting the dir attribute on the div to ltr. --> <div class="loading-indicator"> <div class="loading-error"> <div class="icon-emo-unhappy"></div> <div class="error-message-text" id="error_message"></div> </div> </div> <div id="bc_outer" class="border-container-outer"> <div id="cp_outer_left" class="content-pane-left"> <div id="drawer_menus"></div> </div> <div id="cp_outer_center" class="content-pane-center"> <div id="geoData"></div> <div class="top-bar"> <div id="hamburger_button" class="hamburger-button toggle-grey"> <div class="icon-menu-1"></div> </div> <div id="title" class="app-title"></div> <div class="top-menu-right"> <div id="ShareDialog"></div> <div class="locate-box"> <div id="geocoderSearch"></div> </div> <div id="mobileGeocoderIcon" class="mobile-geocoder-icon icon-right"> <div id="mobileGeocoderIconContainer" class="button-container toggle-grey icon-search-1"></div> </div> <div class="clear"></div> </div> <div class="clear"></div> </div> <div id="mobileSearch" class="mobile-locate-box-hidden"> <div class="mobile-search-container"> <div id="geocoderMobile"></div> <div id="btnCloseGeocoder" class="close-geocoder-button">Cancel</div> <div class="clear"></div> </div> </div> <div id="mapButtons" class="map-buttons"> <div id="LocateButton"></div> <div id="HomeButton"></div> </div> <div id="BasemapToggle"></div> <div id="mapDiv" dir="ltr"> <div id="swipeDiv"></div> </div> </div> </div> [/HTML] When I open up the page in my browser, and go to mapDiv_root in the console, I see that the logo div is not being added. See anything wrong with my code?
... View more
06-20-2014
10:48 AM
|
0
|
0
|
1102
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 01-08-2016 10:52 AM | |
| 1 | 02-24-2015 11:11 AM | |
| 1 | 02-19-2015 10:44 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|