esri / viewer Goto Github PK
View Code? Open in Web Editor NEWViewer is a configurable application template that enables you to display an ArcGIS web map using a variety of tools.
License: Apache License 2.0
Viewer is a configurable application template that enables you to display an ArcGIS web map using a variety of tools.
License: Apache License 2.0
First of all: very nice work!
we downloaded the app and tried to configure the basemap gallery, setting our basemaps group but only the arcgis basemaps compare..
We tried to set parameters in the main.js
in particular the function
"_addBasemapGallery"var basemap = new BasemapGallery({
id: "....", ..(we tried with our group name or our group ID)
and in the function
"_getBasemapGroup"
basemapGroup = {
"owner": "XXXXl",
"title": "Arpa Piemonte Geoportal Basemap",
"id": "36d72c18fcf04e96bab3b73ef0e09a13"
};
but nothing change. Any help is appreciated.
thank you
Enrico
Hi, sorry for the novice question:
we would like to add a new button in the toolbar that open a simple link to a download file (for example an external csv or zip file).
If the toolbar customization is complex we could use any other point on the viewer...
are there samples to do this kind of customizations? Any help is appreciated.
Thank you
Enrico & Manu
Before the latest update the "Layers" window would show only the highest tier data set. The update expanded all the layers to show all the data under the top tier. For example: I had an server based parcel layer in my project with all types of associated secondary layers. Before the update, the "Layers" window only displayed that top tier. Now I see the main layer with all the associated secondary layers expanded underneath and it has greatly diminished the ease of use as it makes the "Layers" window appear cluttered with data that the end user doesn't really need to view. See attached images Before and After the update. Unfortunately this expanded "Layers" window makes the Basic Viewer app unusable for my organization and I will be forced to consider migrating to another app.
After I first load this app and click on the "share" button, the bitly URL doesn't appear until I click on the "share current map extent" option. (I'd take a stab at fixing it myself, but I don't know where to start!)
when a custom geocoder is implemented in the config/commonConifg.js
geocode: [{
url: location.protocol +"//<IP ADDRESS>:<POPRTNUMBER>/arcgis/rest/services/<FOLDER NAME>/XXXX_AddressLocator/GeocodeServer"
}]
I receive a Type Error : this.activeGeocoder is undefined | http://js.arcgis.com/3.11/esri/dijit/Geocoder.js
When the geocoder is only specified in the config/default.js file i do not get the error but the geocode service is still pointing to the default service.
queryForOrg is set to false on both default.js and commonConfig.js files.
My GeoLocator service is returning expected results in the REST endpoint and in ArcGIS for Desktop.
Thoughts? Incantations?
Hello:
First of all, congrats for the template, is just great!
I have a problem with the template, If I use the Esri hosted version it works fine, but if I download it and try to host in our server I have a problem with the legend. In this case the legend show the base map services and text, points, lines and areas items...
I really don't see how can I disable this.
Thanks.
When I import an ESRI shapefile with a DATE attribute the table and popup's in ArcGIS Online oddly subtract one day from all my dates. My organizational map is built in this viewer so I haven't tried an another to see if it's a symptom of the viewer or ArcGIS Online in general. NOTICE: I can subsequently export the data from ArcGIS Online to my desktop and when I open the attribute table in my Desktop ArcGIS the date is fine. I'm guessing it's something to do with ArcGIS Online and how it reads dates? I can forward you a copy of my dataset if you want to see for yourself.
If secured services are used in the application, the alwaysUseProxy property in app.js needs to be set to true. It would be helpful for the user if this is documented in the readme file.
When I only move the position of a feature (without editing the attributes), the edit is being not applied.
The read me mentions the map supports different layout options. Can you point me in the direction of how this is configured?
Thanks in advance...
was having an issue with the print tool. I had changed the url for the print task in both the commonConfig.js and in the default.js and it was still using the arcgisonline print service.
ended up adding a custom print var under _addPrint
_addPrint: function (tool, toolbar, panelClass) {
//Add the print widget to the toolbar. TODO: test custom layouts.
var deferred = new Deferred(),
legendNode = null,
print = null;
var customPrintURL = "my print service" //added to overwrite arcgisonline
...
print = new Print({
map: this.map,
id: "printButton",
templates: templates,
url: customPrintURL
}
... and so on an so forth...
I see that there are two viewers, this ESRI viewer and an older basic-viewer-template-master. I've got this ESRI viewer to work in IE and Chrome but I've got problems with the other viewer in IE. Before doing some more trouble shooting for the basic-viewer-template-master can you tell me the advantages/disadvantages to using this ESRI viewer? Other than I can get it to work!
I have feature labeling setup for my web map. Is it possible to get the labels to show up in my hosted template? They do show up in the template on ArcGIS.com.
Thank you.
Really a great. As with local services integration... It is better if Table is also integrated with local service with this sample.
As integrated with
Good Morning,
I we have a webmap with a secure layer from arcgis server, when the login pop up appears if we cancel the sign in the app stops.
I think would be great if (like in AGOL) the table of content skips that layer.
Thank you for your great job!
from devsummit user
The workflow to deactivate the measuring tool is not very intuitive. I had a user send me a note saying they could not figure out how to turn off the tool. When you click on the X to close the window, it does not turn off measuring. You have to click the measure tool you were using a second time to turn it off.
Maybe I misunderstood what the viewer was supposed to do for me. I'm looking for a viewer I can use that will allow me to specify an alternative arcgis server and basemap. It would be especially cool if it would find the layers on the rest server as well.
A bonus feature would be an input line to enter a location that could be geocoded by a default geocoder or an alternate one.
I also need it to work behind https. The browser complains about http access to
We've created a web map and enabled details. Where is the text sourced from? We can customize the text on a map built using the configuration interface provided with arcgis online. However, we can't see out how to set the text when we create a map using a local copy of the viewer.
I have my active tool set to "None" and the "Measure" tool always pops up when the application is opened. If I set my active tool to "Layers" same thing happens, always starts with "Measure".
If I query a spot on the map that contains two or more features the popup the window will say (1 of #) but the little arrows to toggle between the different popups is gone. It still works if I click on where they used to be but any new user will wonder where to click to toggle the data. This worked yesterday. Today the "Next Feature" toggle arrows are gone.
Thanks for this great template.
The City of Tampa just rolled out an app using this template to show flooded streets for a current emergency. https://tampa.maps.arcgis.com/apps/Viewer/index.html?appid=36b7142d021a425fa9240b4704dc392d
They selected a black color theme and unfortunately this causes the close button on their legend which is open be default (and some other interface elements) to be near invisible. We are concerned that this may have led to some unnecessary user frustration with the app.
Iโm not sure what type of change could be made to the template to resolve this or to warn the person configuring the app. But I wanted to give you the heads up about it.
Yeah... I know... Probably been asked 1,000 time already but i'm gonna ask again.
First i'll say i am a total noob to javaScript, so please bear with me.
Is there anyway we can get a function or methodology to use our own hosted services in this template?
the folks here have a decent function that worked in the old viewer but i am having great issue getting it to work here. I took there code and and put it into an file called buildWebMap.js in the js folder of the source but i am unable to get to reference it in the defaults.js file
Please help.
function createWebMap(){
var webmap = {};
webmap.item = {
"title":"Local Data Layer",
"snippet": "Local service",
"extent": [[-139.4916, 10.7191],[-52.392, 59.5199]]
};
webmap.itemData = {
"operationalLayers": [{
"url": "http://<INTERNAL IP>/arcgis/rest/services/<SERVICE NAME>/MapServer",
"visibility": true,
"opacity": 0.75,
"title": "Farms"
}],
"baseMap": {
"baseMapLayers": [{
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"
},{
"isReference": true,
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer"
}],
"title": "World_Terrain_Base"
},
"version": "1.1"
};
return webmap;
}
When the edit map is activated and the application is running in the Google Chrome or Opera browser on Iphone and clicked on the "Editor" component restarts making it impossible to be able to add a new point.
In the picture you can see how to select the option of adding point, just let selected appear but the menu never disappears, making it impossible to add the point and edit the layer
Hello everyone
I would like to know if it is simple to change the position of the float tool's window from the right to the left (as far as the toolbar also).
Best regards
Ezequias Rocha
Kelly,
This is probably a core issue with AGOL but I figured I would pose the question(s) anyways.
For example a layer named parcels where 3 fields could be specified (Address,Parcel,Owner)?
The searching seems nice but very limited as it is expected for the user to go in and pick which field they want to search. Additionally there is currently not a way to provide an alias for the search. Therefore however the layer is named in the webmap is how it will appear to the end user. This also seems like an enhancement opportunity, by allowing the person configuring the app to give an alias for the search/query they have configured.
I really like the look and feel of the template but I am not sure I could use this in a production environment if my users are expected to know which field to search. Most of our users expect to input their in Search in one location and the application be configured to know what they are looking for. Any thoughts or suggestions would be greatly appreciated. Please keep up the great work, look forward to any enhancements that are coming.
Is it possible to add another geolocator using single line geocode services?
thank you
Enrico
In a scenario where a webmap contains a locally hosted (non ArcGIS.com) map service that is in a different projected coordinate system, the Basic Viewer Share tool does not update the URL (in Map Link or Embed Map) to include the map extent. (even though the box for "Share current map extent" is checked)
While troubleshooting the issue, I created a locally hosted map service that is in Web Mercator Auxiliary Sphere (and a corresponding webmap in ArcGIS.com). In this scenario the Share Tool generates the URL correctly, and allows the Basic Viewer to correctly zoom to the specified map extent when the map is shared.
Is it possible to reorder the widgets in this template? If not, could you give me some guidance as to what would be required code wise to implement this?
I have configured a custom geocoder in my app but when I use URL parameter to locate an address it is still using ESRI geocoder. When I search an address using search box in the app, it uses our custom geocoder.
from devsummit user request
Would love to see a draw tool with color pickers.
Bug in CreateGeocoder.js breaks viewer in Firefox and Chrome when sharinghost is switched to a portal site.
Editing features on mobile with the viewer template UI needs to be changed to be more user friendly. It's not designed for small screens.
Either the template needs to handle this or the editing widget needs to use a more responsive design.
cc @driskull
"For addtional customization options view the wiki"
right now this is pointing at the repo for the legacy viewer. we should create an equivalent wiki for this repo and move @jsomerville's article there.
First of all, I want to let you know that this template is awesome. You guys have finally put out a template that has all of the functionality my users request (layer control, search, bookmarks, printing), so thanks for that!
That being said, I've noticed a few issues when I watch my users using the app:
I'll update this as more users give me feedback.
You can see the template in action on the maps on our homepage http://rail.vermont.gov.
Thanks,
~Stephen
I just want to say that using this template in Internet Explorer 10 with an un-shared ArcGIS Online map was not working for me. After sharing the map to the public the template would work in IE 10. Using the template in Chrome I'd get a "log-in" dialog to view the un-shared map.
Is this the way it is suppose to work? Does this older Basic Viewer Template only work with public shared maps?
My modified version of the app works perfectly with ArcGIS Online but not Portal for ArcGIS Server, apparently not finding libraries--this is a general question I have placed on ESRI's geonet SIG:
How to config maxAllowableOffset of layers for search, or where the code i can update? When i update the code in function _createWebMapItemSources of SearchSources.js as follows:
source.featureLayer = new FeatureLayer(url, { outFields: outFields, maxAllowableOffset: 0.01 });
It does't work!
When using a proxy to authenticate on behalf of a user when accessing secured services, a proxy rule is needed. The code can be added after line 87 in main.js. Eg.
urlUtils.addProxyRule({
urlPrefix: "http://sampleserver6.arcgisonline.com",
proxyUrl: "http://domain.com/DotNet/proxy.ashx"
});
When I try to use a custom geocode service, and configure the commonConfig.js according to the wiki instructions (custom geocode url, queryForOrg set to false), the search box disappears from the site and other elements such as layers, legend, no longer show up when selected.
Many of our clients are used to saving edits manually after creating or modifying a feature. It would be more sensible if there is a "Save" button next to the delete button as it is difficult to determine whether the edits have been saved or not.
In the mobile version of the basic display is difficult to create a new point on the map as to select the type of item, the popup window does not close and can not locate the point on the map.
When you use an Iphone 5 and 5s error is more evident as the size of the screen is smaller, when devices like Samsung s5 are used, it is possible to do the editing, but it would better if this window once you selected point to report, this window will disappear.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.