-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buffer, select and export #228
Comments
I think you can do this pretty easily if I understand you correctly. I've done something similar in one of my apps by building an esri/InfoTemplate in my viewer.js (config file) and passing that as an attribute of my layer's options param. First, include the dependency in your viewer config: define([
'esri/units',
'esri/geometry/Extent',
'esri/config',
'esri/tasks/GeometryService',
'esri/layers/ImageParameters',
'esri/InfoTemplate'
], function (units, Extent, esriConfig, GeometryService, ImageParameters, InfoTemplate) {
...
} Then build the info template. I do this just below where the imageParameters are set up: var myInfoTemplate = new InfoTemplate();
myInfoTemplate.setTitle( 'Info Template With Link' );
myInfoTemplate.setContent( '<a href="{my_field_with_link}" target="_blank">Open in new window</a>' ); Then assign the info template to your layer. Here's an example for a feature layer: operationalLayers: [{
type: 'feature',
url: 'http://services1.arcgis.com/g2TonOxuRkIqSOFx/arcgis/rest/services/MeetUpHomeTowns/FeatureServer/0',
title: 'STLJS Meetup Home Towns',
options: {
id: 'meetupHometowns',
opacity: 1.0,
visible: true,
outFields: ['*'],
mode: 0,
infoTemplate: myInfoTemplate
},
editorLayerInfos: {
disableGeometryUpdate: false
}
},
... If you are using a dynamic layer, you will need to pass as an object with the layer id as the property name {
type: 'dynamic',
url: 'http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/MapServer',
title: 'Damage Assessment',
slider: true,
noLegend: false,
collapsed: false,
options: {
id: 'DamageAssessment',
opacity: 1.0,
visible: true,
// '1' is the id of the layer in my service I want the info template on.
imageParameters: { 1: imageParameters }
},
layerControlLayerInfos: {
swipe: true
}
} Hope this helps. |
Regarding the hyperlink, issue #212 has a few additional examples on how to create the hyperlink in the infoWindow. Regarding your first question about buffer/export, there isn't a process for that in version 1.3.0. There is a set of widgets to support this workflow coming soon. |
Thank you both for your responses. I will be using those as guides for the URL in the infoWindow. It's exciting to hear that a buffer, select and export tool is in the making, in the meantime is there a way to add only a buffer to app? Thanks again, Lacey |
I'm trying to create a buffer at the users input measurement select polys in the buffer and export to a csv. Is there a possible way to do this in one tool? Also, is there a way to get a URL in a field to be a hyperlink in the popup?
Thanks so much,
Lacey
The text was updated successfully, but these errors were encountered: