GithubHelp home page GithubHelp logo

arcgis-portalviewer-dotnet's Introduction

arcgis-portalviewer-dotnet

This project contains source code for the Portal Viewer sample app built using the Windows Store API in the ArcGIS Runtime SDK for .NET. Source code is available to illustrate best practices for building an application using MVVM design patterns with the ArcGIS Runtime SDK for .NET. The app includes functionality to view, search, and interact with maps in an ArcGIS Online organization on on-premises Portal for ArcGIS.

The ArcGIS app available in the Windows Store is an example of a custom application built using the Portal Viewer source code and enhanced with minor customizations to accommodate for branding and workflow.

Image of sample app

Features

  • View and search for web maps
  • Learn about map contents
  • Navigate a map with your fingertips
  • Tap to discover information in the map and view results
  • Use bookmarks to go to areas of interest
  • Measure areas and distances
  • Change visibility and opacity of layers
  • Change basemaps
  • Search for places within the map view
  • View the map legend
  • Pin a map to the Start screen
  • Show your current location
  • Login to an ArcGIS Online organization or Portal

Build

  1. Fork and then clone the repo or download the .zip file.
  2. The Portal Viewer sample requires the Windows Store API in the ArcGIS Runtime SDK for .NET. Confirm that your system meets the requirements for building Windows Store apps.
  3. Download and install the ArcGIS Runtime SDK for .NET. Login to the beta community requires an Esri Global account, which can be created for free.
  4. The Portal Viewer sample requires the ArcGIS Runtime .NET Toolkit. Only the Windows Store edition of the Toolkit is needed by the Portal Viewer sample app. You have three options to reference the Toolkit:
  5. Use submodule
    • The Toolkit is referenced as a submodule in the Portal Viewer repo. If the source control application you use with GitHub pulls submodule content (eg SourceTree), simply build the solution.
  6. Add project to solution
    • Follow the build instructions in the repo for the ArcGIS Runtime .NET Toolkit. Add the Toolkit source project (Esri.ArcGISRuntime.Toolkit.csproj) for Windows Store to the Portal Viewer solution, and add\repair the reference in the ArcGISPortalViewer project. When building the Portal Viewer solution, the Toolkit source will build with the application code.
  7. Use extension SDK
    • Follow the build instructions in the repo for the ArcGIS Runtime .NET Toolkit for distributing the Toolkit using a Visual Studio extension installer (VSIX). Add\repair the Toolkit reference in the ArcGISPortalViewer project.
  8. To build and deploy the Portal Viewer sample app, choose the appropriate platform. In Visual Studio, go to Build > Configuration Manager. Choose the active solution platform for your device. If deploying to Windows RT 8.1, select ARM. If Windows 8.1 32-bit, select x86. If Windows 8.1 64-bit, select either x86 or x64.

Configure

To configure the Portal Viewer sample app to use an organization or Portal for ArcGIS instance:

  1. In the ArcGISPortalViewer project, open App.xaml.

  2. Set the OrganizationUrl property:

    <x:String x:Key="OrganizationUrl">https://myorg.maps.arcgis.com</x:String>

  3. Rebuild the Portal Viewer sample app.

Resources

Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

Contributing

Anyone and everyone is welcome to contribute.

Licensing

Copyright 2014 Esri

This source is subject to the Microsoft Public License (Ms-PL). You may obtain a copy of the License at

https://opensource.org/licenses/ms-pl

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

A copy of the license is available in the repository's license.txt file.

[](Esri Tags: ArcGIS Runtime SDK .NET WinRT WinStore WPF WinPhone C# C-Sharp DotNet XAML) [](Esri Language: DotNet)

arcgis-portalviewer-dotnet's People

Contributors

alaframboise avatar dotmorten avatar hmassih avatar jnery avatar mbranscomb avatar rexhansen avatar zwaap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcgis-portalviewer-dotnet's Issues

Selection made from Identify tab remains highlighted until new Identify is completed.

To reproduce:
Identify an item and use flipview to navigate to popup info. Notice that this highlights the map.
image
Perform another identify. Notice that previous selection was not cleared.
image

chrisahill commented

rexhansen We need you to evaluate this issue and decide if it should get fixed. This issue that jNery created doesn't look like a bug to me. This matches the behavior from the previous version. The current behavior was designed to match the previous application. Is this something you would like to change in the current version otherwise I would consider this to be "AsDesigned"

jNery commented

rexhansen and chrisahill : Yup this was the same behavior as Preview app and I was not sure if bug or as designed but maybe something we can consider for evaluation. I was just thinking since performing search clears results before new results come in, user might expect performing identify on new area would also clear results before new results come in, just as ArcGIS.com does on its identify.

arcgis-portalviewer-dotnet-private/issues/142

When performing identify with only one point result, place maptip at point

If you only get one result back, and that result is a point, instead of using the click point as the identify location for the popup, use the geometry of the result. This ensure that when you zoom closer to the point, the popup stays right on top of that point.
Also if result is a single polyline, use the GeometryEngine.NearestCoordinateInGeometry to 'snap' the maptip onto the geometry.

If Bing layer cannot be loaded, replace with complimentary ArcGIS Online layer

With the fix for #41, if a user is a member of an organization that has published a Bing key, Bing basemap layers within webmaps can be loaded successfully. If a user does not have access to a Bing maps key through their organization, the Bing basemap layer will not load and the basemap in the map will remain empty. In this situation, replace the Bing basemap with a complimentary ArcGIS Online layer. This matches the ArcGIS.com Viewer experience.

Bing Maps hybrid =
http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer
reference: http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer

Bing Maps aerial =
http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer

Bing Maps road =
http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer

Featured map missing from list

Login to ArcGIS Online to an org with featured maps. For example, use the Windows Store demo user. Note that the National Geographic map is missing from the featured maps group. It’s listed on the web site, not in the app.

Remove save credentials checkbox

No choice should be presented... the app should persist the logged in user until they explicitly log out.

Related to arcgis-portalviewer-dotnet-private/pull/9

arcgis-portalviewer-dotnet-private/issues/38

Bookmark and StartExtent do not cancel each other

To reproduce
Open map with bookmarks
image
According to Chris, this view may also be improved by setting max size on the flyout (separate UI issue).
Click to zoom to any of these bookmarks
And click on StartExtent button.
StartExtent fails to interrupt the bookmark flyout.

Note that within bookmarks, clicking another bookmark correctly interrupts FlyTo navigation where last bookmark wins. But bookmark with StartExtent is not able to communicate and cancel the other.

jNery commented
Tried to evaluate this issue outside of Viewer and I cannot reproduce. It seems in the Viewer, it takes two clicks to activate command from StartExtent button if a bookmark has been selected. No other SetViewAsync calls seem in conflict except for this two and they share the same OnSetView command, though code is not hit on a single click of StartExtent button. According to @hmassih fixing this should be postponed as it is low in priority.

arcgis-portalviewer-dotnet-private/issues/134

App crash when double tap first measurement point

(On touch screen only) When using measurement if you doubled tap the map before drawing app crash, or draw the first point and double tab it app crash.

steps to repro

open any map
select measurement
double tap the map
or

open any map
select measurement
draw the first point
double tap the point

arcgis-portalviewer-dotnet-private/issues/197

Support semantic zoom

In the original ArcGIS Preview app (v1.x), semantic zoom is supported on the main page. Pinch to view groups and their thumbnail. Tap one to zoom to that group on the main page.
semanticzoom

arcgis-portalviewer-dotnet-private#37

When searching for street addresses, the displayed results should be improved.

When searching for street addresses e.g. “1800 w stella ln”, a number of results are returned, but the attribute information listed with each result in the app is not useful. In cases where the Type for a result is empty, maybe we should consider using the value in the name field. Below is a json example where the name field has “better” value.

json snapshot

On Surface screen some Map Titles doesnt fit on the header

On Surface or smaller screens Search for "testmap-sage-4-16-14-us" and open the map then check the map title in the header looks like below image

screenshot2

Another one: search for "current wildfire activity and precipitation" open the second map and the header is look like below image

screenshot1

Add Unit Tests

Getting the following error message when running "Unit Test Library (Windows store apps):

Failed to activate Windows Store app unit test executor. Error: The remote procedure call failed.

Links found online that describe similar issues:

http://stackoverflow.com/questions/16539794/windows-store-app-unit-test-fails-when-using-custom-control

https://connect.microsoft.com/VisualStudio/feedback/details/790477/winrt-mstest-runner-fails-when-using-ilist-t-properties-of-custom-types-from-xaml

arcgis-portalviewer-dotnet-private/issues/119

Application Cleanup

  • Fix hardcoded strings with close attention to window store app localization.
  • Make sure XAML keys are consistent across the app e.g. converter names.
  • Make sure all public methods are properly commented.
  • Run Reshaper and fix where appropriate/applicable

hmassih referenced this issue
arcgis-portalviewer-dotnet-private/pull/103

arcgis-portalviewer-dotnet-private/issues/92

Group content shows items which are not web maps

To repro:

  1. Login as a user that is a member of a group that contains portal items which are not web maps.
  2. Open the group content, note that items other than web maps (eg service items) are listed. Only web maps should be listed. Note, you can view the info for the item, but are unable to open it ("open map" is not enabled).

Identify does not pan to highlighted feature when it is outside current view

image

When going to the details tab or clicking zoom, the feature is highlighted on the map and brought into view but clicking next on flipview only highlights the next feature even but does not pan to the feature. Notice the partially highlighted feature. Other times the feature is completely outside the view.

Not sure if this is a bug or enhancement request.

chrisahill commented

Changed status from bug to feature because this is more of an enhancement than a bug since the previous application doesn't do this.

arcgis-portalviewer-dotnet-private/issues/152

No way to see the full Map name if it is too long

If the WebMap name or title is too long there is no way in the app to see the full name.

Example: search for "testmap-sage-4-16-14-us" this is a part of the map name, Open the map and try to know the full name/title of the map.

This is the full name I get it from arcgis.com:
TestMap-Sage-4-16-14-US Wildfire Activity Web Map-Template-Copy

suggestion: It will be so good if we was able to animate the long name/title to show the full name/title of the map on the tiles (image below) in an animated way moving from right to left and repeat.

animatedtitles

Some layers do not render but legend and layer list include them and no error loading webmap was thrown.

Login as Demo user or search for "Trade Area Analysis"
http://www.arcgis.com/home/webmap/viewer.html?webmap=682d95dc3e6148d096b8fcceb36309d1
Preview App
image
Current Portal Viewer app
image
image

This could be an API issue but layer list and legend seem to include the layer that does not render

jNery commented on Mar 6

Bug is reproducible outside Portal Viewer app and may be an API bug.
arcgis-portalviewer-dotnet-private/issues/157

Identify tab: Some attribute value do not display as hyperlink

This webmap show attribute as hyperlink:

http://www.arcgis.com/home/webmap/viewer.html?webmap=2b84f1c4d7a14699b771b4edf17e423c
To reproduce choose the same webmap on the Portal Viewer app and Identify any feature to show the popup info.
image

http://www.arcgis.com/home/webmap/viewer.html?webmap=a03a49082c1c4e869c6349d9cdccf2a3
image

Some webmaps seem to convert to hyperlink successfully

http://www.arcgis.com/home/webmap/viewer.html?webmap=df8bcc10430f48878b01c96e907a1fc3
image

chrisahill commented
Changed the status from "bug" to "feature". HTML has hyperlink tags that are displayed clickable. the attributes in a dictionary are just string text that we don't know if it is a url or not. We would have to enhance the Popup control to test the data and show a HyperlinkButton instead of a Textblock but this would be fair amount of work to enhance. I think this issue is valid that a user sees a link they want to be able to click it, we should do it next release.

arcgis-portalviewer-dotnet-private/issues/145

Filter search results based on the map extent

Now that FindAsync honors the SearchExtent parameter, add the current extent of the map as a search filter.
Also, show the result's type, city, country next to its name in the list of search results.

Measure tab: Completed shape is removed from the map

While Measure is not complete, the geometry is displayed
image

After double-click to complete the draw, the geometry is removed from the map.
image

The preview app keeps the completed geometry but I don't know if this is a bug since the new Editor is expected to remove contents of SketchLayer. To workaround this, the measure layer need to contain a clone of graphics on the SketchLayer produced by the editor before they get cleared.

arcgis-portalviewer-dotnet-private/issues/146

Ported the viewer to UWP

I have ported the existing ArcGIS Portal Viewer to a UWP app. It still has dependencies with the ArcGIS Runtime for the Windows Store API so it cannot be published to the Windows Store. But I have created app packages and side loaded the app in some Windows 10 devices and it worked great.

I have fixed some minor issues e.g. the Behaviors events not working well in UWP and the Settings Pane not being available in UWP as Microsoft recommends including the Settings in the app now.

Probably you are working on a new ArcGIS Portal Viewer for UWP but since I don't know that this app can provide some benefits meanwhile.

Repo: https://github.com/dimesv/arcgis-portalviewer-dotnet
Dependency with UWP project here: https://github.com/dimesv/arcgis-toolkit-dotnet
Pull Request: #64

Opening map with Bing Maps basemap prompts for credentials

Opening a web map with a Bing Maps basemap prompts the user for credentials when already signed in to the app. Enter same login credentials used to sign-in to the app and the Bing Maps basemap displays. Cancel and the basemap does not display. The user should not be prompted for credentials. If the organization of the logged in user account has a Bing Maps key, it should be used transparently.

arcgis-portalviewer-dotnet-private#99

Some webmaps that used to load all layers, load partial.

These webmaps worked yesterday
http://www.arcgis.com/sharing/rest/content/items/98b02dccb5b04709992144dc694b9176/data?f=pjson http://www.arcgis.com/sharing/rest/content/items/9eab2c9e2eaf47129ffa9ff5eb7f7b79/

image

They now load with missing layers and can be reproduced outside the app
Created CR283351 "Webmap drops some operational layers that should have been parsed as ArcGISDynamicMapServiceLayer."

arcgis-portalviewer-dotnet-private/issues/165

Add top app bar for easier navigation within the app

When navigating deep into the app, it may require many actions to get back to the home page, which can be quite cumbersome (eg try doing 10 searches back to back, view a map, then get back to the home page). To resolve this issue in other apps (Store, Bing News, etc) a top app bar is available to go back to the home page (as well as other locations in the app).

Layers tab exist by default and empty with maps with only base map

1- Search and open (Map with census service item) Layers tab exist and showing map layer

viwerlayertab2

2- Search and open (Map for comments) Layers tab button not exist and Layers tab exist by default and no layers on it

viwerlayertab

Expected result is to be like image below with the search tab is the default tab.

viewerlayertab3

Related to: arcgis-portalviewer-dotnet-private/issues/156

arcgis-portalviewer-dotnet-private/issues/194

Add tooltip for web map titles

Sometimes the title of a web map is longer than the area provided in the app to show the title. In this case it might be helpful to provide a tooltip to show the full name.

arcgis-portalviewer-dotnet-private/issues/187

Toggle opaque background for attribution

In some cases, seeing the attribution text is difficult due to the transparency of the attribution control and complexity of the map below the control. A more ideal solution would involve tapping\clicking on the attribute control to toggle between complete and partial opacity. If the control needed to expand, when expanded the control would be completely opaque. When collapsed to its abbreviated state, it would become partially opaque (as it is now).

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.