|
POST
|
I've added in the measurement widget to my project, but now I am trying to turn the pop-ups off while the widget is in use. I've tried the different solutions that have been mentioned in other forum threads on this topic without any luck. I'm still pretty new to the JavaScript API, so I imagine this is a much easier fix than I'm making it out to be. Here's an example of one of my infoTemplates, should that be helpful in resolving this: //Create Trails InfoTemplate
var trailsInfoTemplate = new InfoTemplate();
trailsInfoTemplate.setTitle("<b>${Trail_Name}</b>");
var trailsInfoContent =
"<div class=\"InfoContent\">" +
"Trail Type: ${Trail_Type}<br><br>Located On: ${Tract}<br><br>Length (mi.): ${Mileage}"
+ "</div>";
trailsInfoTemplate.setContent(trailsInfoContent); Here's the measurement widget portion of my project: var snapManager = mapMain.enableSnapping({
snapKey: has("mac") ? keys.META : keys.CTRL
});
var layerInfos = [];
snapManager.setLayerInfos(layerInfos);
var measurement = new Measurement({
map: mapMain
}, dom.byId("measurementDiv"));
measurement.startup();
... View more
11-10-2015
09:43 AM
|
0
|
2
|
4261
|
|
POST
|
Thanks Robert! I got that issue straightened out. I now have a couple of other things to work on to get measure working the way it should, but this probably has me headed in the right direction. Thanks again!
... View more
11-09-2015
02:00 PM
|
0
|
0
|
2113
|
|
POST
|
I am using parser.parse in my app. Not so sure about the other, but I'll look around for it!
... View more
11-09-2015
01:45 PM
|
0
|
0
|
2113
|
|
POST
|
I'm also receiving this error: Error: Tried to register widget with id==dijit_layout_ContentPane_0 but that id is already registered Could that be causing the problem I'm having? Is it possibly a CSS issue?
... View more
11-09-2015
01:38 PM
|
0
|
3
|
2113
|
|
POST
|
I've changed them to the slash version, but it did not resolve the problem.
... View more
11-09-2015
01:24 PM
|
0
|
0
|
2113
|
|
POST
|
I'm not sure what happened, it looked right on my screen when I posted. Should be corrected.
... View more
11-09-2015
12:59 PM
|
0
|
6
|
2113
|
|
POST
|
I've added in the Measurement Widget to my project following the sample provided on the Developers page. I am having a problem with the div that I haven't been able to resolve. As I currently have it added in, I get the pane where I placed it, but I have no icons when I open the widget. I've moved the div around and have made some changes where I get the icons, but have no background. When the icons are visible, the different measurement options work as expected. Any ideas on how to resolve this? Here's the body portion of my HTML file: <body class="nihilo">
<div id="mainWindow" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline'"
style="width:100%; height:100%;">
<div id="header" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'top'">
<div id="PrintButton" style="position:absolute; right: 20px; top: 10px"></div>
<div id="title">
<a id ="logo" href="http://www.outdooralabama.com" target="_blank"><img src="images/OA_Header.png"></a>
</div>
</div>
<div data-dojo-type="dijit.layout.ContentPane" id="leftPane" data-dojo-props="region:'left'">
<div id="tocDiv"></div>
</div>
<div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
<div style="position:absolute; right:20px; top:25px; z-Index:999;">
<div data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Switch Basemap', closable:false, open:false">
<div data-dojo-type="dijit/layout/ContentPane" style="width:380px; height:280px; overflow:auto;">
<div id="basemapGallery"></div>
</div>
</div>
</div>
<div style="position:absolute; right:15px; bottom:50px; z-Index:999;">
<div id="measurementDiv" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Measurement', closable:false, open:false">
</div>
</div>
<span id="latlong" style="position:absolute; right:20px; top:8px; font-size:80%; color:#FFFFFF; z-index:50;"></span>
<div id="HomeButton"></div>
<div id="search"></div>
</div>
</div>
</body>
... View more
11-09-2015
12:47 PM
|
0
|
8
|
5355
|
|
POST
|
Thanks Robert. When I read over the documentation I took the comments about the suggestions to be something that dealt with the autofill of possible 'answers' as a user typed in the search box based on what was included in the attribute table, and not with the results themselves. This wasn't an issue with the FlexViewer search widget. Is there a way to get the search in JavaScript to perform similar to the Flex search widget?
... View more
10-13-2015
11:31 AM
|
0
|
0
|
1718
|
|
POST
|
I'm using the search multiple sources example (https://developers.arcgis.com/javascript/jssamples/search_multiplesources.html) and I'm beginning to modify it to fit my needs. It's more or less working as it should, except for the results it returns when the search should select multiple points and instead it chooses just one. For example, I want to find the boat ramps on a particular body of water. I input Pickwick, and it's automatically returning one ramp, instead of the 5 or 6 it should. Anyone else run into this? Here's the applicable portion of my code, as it is now: sources.push({
featureLayer: new FeatureLayer("https://conservationgis.alabama.gov/adcnrweb/rest/services/Fishing_DCNR/MapServer/5"),
searchFields: ["Waterbody"],
displayField: "Access_Are",
exactMatch: false,
outFields:["Access_Are"],
name: "Boat Ramps",
placeholder: "Waterbody Name",
maxResults: 15,
maxSuggestions: 15,
infoTemplate: rampsInfoTemplate,
enableSuggestions: true,
minCharacters: 0
});
... View more
10-13-2015
09:47 AM
|
0
|
10
|
3755
|
|
POST
|
David, yes the proxy.config includes a serverUrl for the print server. Michael, I am using https for the print service. It is set to run synchronous. After talking with tech support last week and IT staff this morning, it looks like the issue might be caused by the server not recognizing it's public IP address. The IT folks are working on that now, so hopefully once they have that resolved it will resolve my print issue. Ashley
... View more
08-24-2015
10:12 AM
|
0
|
1
|
806
|
|
POST
|
I've been able to ping the new proxy, but still getting a 500 error when I try to print. After spending some time with tech support, we still haven't been able to resolve the problem. They feel its likely a setting on the server.
... View more
08-21-2015
01:19 PM
|
0
|
4
|
2119
|
|
POST
|
So at this point, I've done a few different things. I took a working Flex app and changed the print widget in it to hit the service I created. It pulled the layout templates in correctly, so I moved forward with trying to print. It gave a 400 error. I then checked my logs on server and it told me that contact could not be made with my map server. I then did some searching on that and one of the suggestions was to be sure I had the newest version of the proxy. I downloaded it again and added it fresh to my server. I have not made any changes to it yet. I tried to ping the proxy and I'm getting a 403 error and it says I must log in to see the site. I believe at this point my issue is with my proxy and possibly the settings in IIS. In IIS, anonymous authentication is enabled and everything else is disabled.
... View more
08-21-2015
10:56 AM
|
0
|
6
|
2119
|
|
POST
|
With that response, I wish I had been working with JavaScript longer than 3 weeks! This is the first time I've created a print service, and the first time I've dealt with a proxy. So I'll have to do some research to be able to answer most of your questions. The print service is reachable and there are no typos. I have not tested the print service, though I'll see what I can do to accomplish that. And then I'll start going through the other things you've mentioned.
... View more
08-21-2015
06:34 AM
|
0
|
0
|
2119
|
|
POST
|
David, Thanks for the response. That seemed to clear up the CORS error, but now I'm getting another one: I'll see what I can find on it. Ashley
... View more
08-20-2015
12:13 PM
|
0
|
10
|
2119
|
|
POST
|
I am having a very similar issue as is mentioned here: https://community.esri.com/message/399585. I've added in Print dijit and PrintTemplate task and get a print button. However, when I click it, it changes from Print to Printing, runs for a bit, then changes back to Print. When I check the Firefox developer tools, I get this error: I've added in a proxy on my server and gone through the steps to enable CORS mentioned at enable cross-origin resource sharing. I'm still getting the error. At this point, I'm not sure if it is an issue in my code, or that I need to place the proxy on my local machine, where I'm building. I can't turn on IIS on my local machine, as our IT folks don't allow it. Here's the code I added in for printing and the proxy: esriConfig.defaults.io.proxyUrl = "http://myURL/DotNet/proxy.ashx", esriConfig.defaults.io.alwaysUseProxy = false; //Create Printer Layouts Array var myLayouts = [{ "name": "Print_Landscape", "label": "Letter (Landscape Orientation)", "format": "pdf" }, { "name": "Print_Portrait", "label": "Letter (Portrait Orientation)", "format": "pdf" }]; //Create Print Templates var myTemplates = []; dojo.forEach(myLayouts, function (lo) { var printTemp = new PrintTemplate(); printTemp.layout = lo.name; printTemp.label = lo.label; printTemp.format = lo.format myTemplates.push(printTemp); }); And this portion after creation of my map: //Add Print Widget var PrintWidget = new Print({ map: mapMain, url: "https://myURL/rest/services/CustomPrint/GPServer/Export%20Web%20Map", templates: myTemplates }, "PrintWidg"); PrintWidget.startup(); Any help/guidance would be much appreciated! Thank you in advance! Ashley
... View more
08-20-2015
08:59 AM
|
0
|
13
|
5933
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-30-2025 01:35 PM | |
| 1 | 08-31-2023 01:21 PM | |
| 1 | 02-04-2025 06:23 AM | |
| 1 | 08-21-2023 01:28 PM | |
| 1 | 03-04-2024 01:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-03-2025
11:15 AM
|