GithubHelp home page GithubHelp logo

esri / explorer-integration Goto Github PK

View Code? Open in Web Editor NEW
6.0 28.0 3.0 81 KB

Multi Language repository that contains documentation and sample code for creating custom URL schemes in Explorer for ArcGIS.

License: Apache License 2.0

Python 58.35% HTML 39.41% CSS 2.24%

explorer-integration's Introduction

This repository is archived and no longer managed.

Please vist the ArcGIS Explorer help documentation for more information on linking to Explorer

Explorer custom URL scheme

This is a multi-language repository that contains documentation and sample code for creating custom URL schemes in Explorer for ArcGIS.

Supported versions

  • iOS: Explorer for ArcGIS 18.1.0 or later
  • Android: Explorer for ArcGIS 18.1.0 or later with limited support

What's included

Get started

Read the following documentation and clone down the appropriate language into your development environment.

Documentation

What is the Explorer for ArcGIS URL scheme?

A URL scheme allows you to launch a native app from another app, website, or email. You can set options in the URL that will be passed to the app you want to open, causing it to perform specific functions, such as opening a map to a specific location and scale. This capability is available on Explorer for ArcGIS for iOS and Android.

Explorer URL scheme overview

All Explorer URL schemes start with the application scheme of arcgis-explorer:// and can contain additional query parameters in the following format:

arcgis-explorer://?parameter=value&parameter=value

The following diagram is meant to be used as a quick reference to show how the parameters can be used together. The rest of this topic describes each parameter in greater detail.

image

Using URL scheme to customize map viewing experience

itemID

This is one of the simplest parameters that can be used. Explorer searches for the item (in ArcGIS Online or Portal) and attempts to open the map using the map’s default center and scale. If the user is not signed in, Explorer will continue without signing in and search ArcGIS for the item.

itemID: Sets Item ID for the map. The item referenced can be of type Web Map or Mobile Map Package that is shared with the current user. Mobile Map Packages will be automatically downloaded if not already on-device. If the item referenced is shared publically in ArcGIS Online, the user tapping on the URL scheme does not need to be signed in to Explorer in order to access the map.

The following examples show how you can open a specific map from a URL.

// open a public Web Map
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84

// open a public Mobile Map Package
arcgis-explorer://?itemID=6ca5f9cfea0c47b2969ee9750693301f

NOTE: All other parameters require that a item id be specified.

In addition to opening a map to the default center and scale, there are a couple ways to set the map extent in order to provide a custom map viewing experience. You can specify the center and scale (optionally providing wkid, rotation, and/or markup parameters) or specify a bookmark from the map . Alternatively, you can search within the map to let Explorer determine how the initial extent should be set while also displaying the matching results.

center, scale

center and scale are used in conjuction to recenter a map. The center parameter can include either a set of latitude and longitude coordinates (decimal degrees), a query formatted address, or a feature search result. When specifying a center, the scale must also be provided.

  • center: Centers the map to a certain location. Provide center in the following formats:
    • Comma-seperated latitude/longitude (y/x) pair in WGS84 (WKID:4326)
    • Address (plus-encode spaces) to be reverse geocoded by organization geocoder (Mobile Map Package's with locators will not utilize geocoder)
    • Feature search result (plus-encode spaces). Explorer will automatically center on top result.
  • scale: Sets the scale in map units that the map should be rendered.

The following examples show how you can use center and scale to adjust the map view point from a URL.

// center on a coordinate pair
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&center=41.780618,-88.179449&scale=3000

// center on a reverse geocoded address
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&center=899+Aurora+Ave,+Naperville,+Illinois&scale=1000

// center on a feature from map. In this case, Hydrant #43141
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&center=43141&scale=500
wkid, rotation, markup

In addition to providing a center and scale, you can optionally specify any combination of the wkid, rotation, or markup parameters. Note, when using any of these parameters, an itemID and center/scale are required.

  • wkid: Specify coordinates in a different spatial reference. Defaults to WKID: 4326 (WGS84) if parameter is not used.
  • rotation: Rotate the given map 0-360 degrees. Sets the rotation in degrees that the map should be rendered. Acceptable values range from 0 - 360.
  • markup: Enable markup mode when opening a map.

The following examples show how the wkid, rotation, and markup parameters can be used together from a URL.

// rotate the map 180 degrees
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&center=41.780618,-88.179449&scale=1000&rotation=180

// center on coordinates in NAD83 / UTM zone 19N (WKID: 26919) spatial reference
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&center=4807094.8078305572,-1096767.7053304175&scale=1000&wkid=26919

// rotate the map 180 degrees and enable markup mode
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&center=41.780618,-88.179449&scale=1000&rotation=180&markup=true
bookmark

Instead of providing a center and scale, the bookmark parameter can be used to open the map to a specific viewpoint by specifying a bookmark from the map. When providing a bookmark, you must also provide an itemID for the map. You cannot provide any additional parameters.

  • bookmark: Adjusts map viewpoint to the specified bookmark from the map. Bookmark name should be plus-encoded for spaces.

The following example shows how to open a map to a specific bookmark within the map from a URL.

// open map to a bookmark named "Centennial Park"
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&bookmark=Centennial+Park
search

The search parameter allows you to quickly launch a map and execute a search, returning places and feature results without having to manually type your query using the search tool.

  • search: Executes a search, returning places and/or features. Query string should be plus-encoded for spaces.

The following examples show how you can use the search parameter in a URL.

// search for an address from the geocoder
arcgis-explorer://?itemID=15c3a41bc01e4f8b9922736f3c194c29&search=899+Aurora+Ave,+Naperville,+Illinois

// search for a POI from the geocoder
arcgis-explorer://?itemID=15c3a41bc01e4f8b9922736f3c194c29&search=Gas+Station

// search for a feature from map. In this case, Hydrant #43141
arcgis-explorer://?itemID=0c900ae2a1084d27b608233921ef1a84&search=43141

Known Issues

  • Support on the Android version of Explorer for ArcGIS is limited to itemID, center/scale, and rotation parameters. Center parameter cannot reference feature from layer configured for search.

Errors

If an error is encountered when processing a URL scheme, the user will receive an alert.

Sample code

Resources and related repositories

Not Esri's doc but still pretty dang useful :-)

Issues

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

Contribute

Anyone and everyone is welcome to contribute. See our guidelines for contributing.

Licensing

Copyright 2016 Esri

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

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.

[](Esri Tags: iOS, Android, Explorer, URL Scheme) [](Esri Language: Java, Swift, Javascript)

explorer-integration's People

Contributors

joelwhitney avatar brentpierce avatar

Stargazers

XC avatar PassiveTech avatar  avatar Chris Brink avatar  avatar Erdong avatar

Watchers

Rene Rubalcava avatar Eric Ito avatar James Cloos avatar  avatar Sabine Barrera avatar Isaac Gomez avatar Heather McCracken avatar Christopher Hill avatar  avatar Scott Simon avatar J. Dou avatar Jay Chen avatar Saranya Kesavan avatar Sunee Puckdee avatar Jeff Shaner avatar Mark Bockenhauer avatar  avatar Rui Ge avatar Doug Morgenthaler avatar  avatar Craig Gillgrass avatar Chris Brink avatar Mabel Ney avatar Tom Bruns avatar Colin Lawrence avatar Emily Gibson avatar Neel Chowdhury avatar  avatar

explorer-integration's Issues

Support bookmarks as part of applink?

arcgis-explorer://?itemID=2adf08a4a1a84834a773805a6e86f69e&bookmark=My+Bookmark+1

Explorer would open the map and zoom to the specified bookmark.

center explorer on lat/long pulldata in survey123

I have existing point data in Survey123. Crews will use this existing data to enter attributes using the Inbox. I would like the crews to be able to click on a link from the Survey123 inbox that will open a map in Explorer with the same coordinates as the point in the Inbox. I have created a note field in Survey123 that opens the map in Explorer, but I cannot get it to open at the location that corresponds with the location of the point in the Survey123 inbox.

URL doesn't work on Android

My URL to a public map in ArcGIS Online isn't working on my Samsung Galaxy S10 with Explorer 18.1.0.
arcgis-explorer://?itemID=a35db501294c482e97db50c0444e23d1 just opens a browser tab (tried Chrome and Samsung browser) that says "this site can't be reached" with the URL of http://0.0.0.1/11966 in the address bar.
If I search for the itemID while not logged into Explorer, I can indeed find and open the webmap. So the issue just seems to be getting Android to open the Explorer app with that URL.

From Explorer Get Location Push Data to Survey123

Is it possible to use a dynamic url that centres the location defined from Explorer, then opens the same location in Survey123, i.e. from the pushpoint location set in Explorer
I envisage something like this
arcgis-explorer://?itemID=4adf08a4a1a84834a773805a4e863f9e&center=pushpoint_xcoord,pushpoint_ycoord&scale=5000
At the moment the Survey123 defaults to the current GPS position, but I want to report on say 3 features in the vicinity that can all be viewed from the pushpoint location.

I also would like to find a way to use the markup line feature in Explorer and pass that line to survey123 directly as a newly captured line feature.

arcgis-explorer://?itemID=21a03ed111f4421a8d79d098e4bbee39 where this item is a line as a markup feature created in Explorer

Portal for ArcGIS

Is this custom URL scheme capable of passing a reference to a Portal of ArcGIS? Or in other words: is is possible to connect anonymously to a Portal, without registering a connection at Explorer for ArcGIS in advance?

Explorer generated share link does not work

I have generated a short URL (http://arcg.is/1PTPzJM) from the older version of Explorer for ArcGIS. However, this link cannot be open since this April. When opening the URL, only a blank webpage is shown.
Apprently, the link is in a format of "https://www.arcgis.com/home/mobileviewer/appsharer.html?id=" which does not seem like working anymore.

I am wondering if this appsharer link is no longer working or not? If so, is it like permanately stop working? Is there any chances for this appsharer link to be resumed?

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.