Coder Social home page Coder Social logo

esri / information-lookup Goto Github PK

View Code? Open in Web Editor NEW
6.0 23.0 25.0 741 KB

Web app template that is used to determine if the location specified intersects a polygon

License: Apache License 2.0

JavaScript 90.85% CSS 6.93% HTML 2.22%
web-development publishing-sharing javascript webapp configurable-apps

information-lookup's Introduction

information-lookup

Web app template that is used to determine if the location specified intersects a polygon. The location entered is optionally stored in a layer in the web map.

App

Features

  • Place Finding - Find places or geocode an address
  • Graphics - Draw a point
  • Query - Determine if drawn graphic is within a specific area
  • Webmap- Use the template with ArcGIS Online webmaps

Instructions

  1. Fork and then clone the repo.
  2. Update the configuration settings to use template
  3. Run and try the samples.

Requirements

  • Notepad or your favorite HTML editor
  • Web browser with access to the Internet

Deploying

  1. To deploy this application, download the template from Portal/ArcGIS Online and unzip it.
  2. Copy the unzipped folder containing the web app template files, such as index.html, to your web server. You can rename the folder to change the URL through which users will access the application. By default the URL to the app will be http://<Your Web Server>/<app folder name>/index.html
  3. Change the sharing host, found in defaults.js inside the config folder for the application, to the sharing URL for ArcGIS Online or Portal. For ArcGIS Online users, keep the default value of www.arcgis.com or specify the name of your organization.
  • ArcGIS Online Example: "sharinghost": location.protocol + "//" + “<your organization name>.maps.arcgis.com
  • Portal Example where arcgis is the name of the Web Adaptor: "sharinghost": location.protocol + "//" + "webadaptor.domain.com/arcgis"
  1. If you are using Portal or a local install of the ArcGIS API for JavaScript, change all references to the ArcGIS API for JavaScript in index.html to refer to your local copy of the API. Search for the references containing "//js.arcgis.com/3.15" and replace this portion of the reference with the url to your local install.
  • For example: "//webadaptor.domain.com/arcgis/jsapi/jsapi" where arcgis is the name of your Web Adaptor.
  1. Copy a map or group ID from Portal/ArcGIS Online and replace the default web map ID in the application’s index.html page. You can now run the application on your web server or customize the application further.

Note: If your application edits features in a feature service, contains secure services or web maps that aren't shared publicly, or generate requests that exceed 200 characters, you may need to set up and use a proxy page. Common situations where you may exceed the URL length are using complex polygons as input to a task or specifying a spatial reference using well-known text (WKT). For details on installing and configuring a proxy page see Using the proxy. If you do not have an Internet connection, you will need to access and deploy the ArcGIS API for JavaScript documentation from developers.arcgis.com.

Resources

Issues

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

Contributing

Esri welcomes contributions from anyone and everyone. Please see our guidelines for contributing.

Licensing

Copyright 2013 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.

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

[](Esri Tags: ArcGIS Web Mapping Service information Public Utilities Water-Utility Utilities Water Gas Electric) [](Esri Language: JavaScript)​

information-lookup's People

Contributors

clareprice avatar joalvarez avatar mikemillergis avatar previnwong avatar

Stargazers

 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

information-lookup's Issues

Error on first search - subsequent searches fine

I have found that if a layer with thousands of small polys is used as a lookup layer then on some browsers or slower internet connections, the first search will produce the error message about the search being out of bounds or something. This is simply because the search was fast and tried to return data before the lookup layer could load. It would be nice if the app could wait until all layers have loaded before trying to produce data in the side panel.

combinedPopups.js not working properly when search by a polygon feature in a polygon layer

I tracked it down to line 403 and 416.
403: if (layer.featureCollection !== null) {
416 } else if (layer.layerObject !== null) {
Both line crash when object is undefined.

They should be
403: if (layer.featureCollection != null) {
416 } else if (layer.layerObject != null) {
which will detect both null and undefined.

I think this was right at a time in the past but somehow was reintroduced later on.

When side panel option is on, map result shifts

If using side panel, the map shifts right of centre on the web app when embedded, on the first search result. Subsequent search results are OK. But because the side panel activates it pushes the web map to the right.
image

image

Enhancement Request - return additional information in 'outside service area popup'

The current app only reports outside service area if no features are returned.

I'm using multiple feature layers to display in the standard app popup, I need the service area to report additional information from a standard popup even if the feature is outside the service area.

For example, I need parcel information AND floodplain information to appear in the popup when intersect = true. I need just the parcel information presented if intersect = false.

Side panel popup width

I'm trying to configure the popup width when configured to open in the side panel. Having a little trouble identifying the correct location to configure.

Share link button opens the app in a new tab

I'm using this template through AGOL (created a web map and shared it using the Information Lookup template). The link button at the bottom of the docked pop-up does not offer sharing options. Clicking it results in the same web app opening in a new tab.

Error handling: Unable to display results if image in pop-up unavailable

If an image, set in the web map's pop-up media, becomes unavailable, the app will linger when querying a location with this pop-up image. Ideally, an image should not be unavailable however would it be possible to still have the pop-up display with the image unavailable icon, like what happens in the web map?
image

Add support for Tiled Map Services

Published a single feature service as both a map and feature service.
Added the map service to a web map and enabled pop-ups. Configured with Info Lookup and receive:

Lookup Layers Settings
Lookup Layers

No layers available. Check your web map for valid layers.

Here's the map service and web app I used.

Went pecking in the source code and came across this.

Enhancement Request - Add other geometry types to intersect workflow

As a citizen, I need to search for my parcel (or a parcel that I’m thinking about purchasing) by address or parcel number and select it on the map. From that selected parcel, I need to find out if it is in the floodplain (intersected feature).

  • Current “point” based location not sufficient for reporting – I would think for a very large - maybe not (+- 10 AC) parcel it may also not have utility service where the address lookup is going?
  • The improved structure may be out of the floodplain but the parcel inside (future improvements)

Screenshot – these parcels are technically in the floodplain but the address search reports them “not” in the floodplain.

flood

Popup URL Links not formatting correctly

I'm having a problem getting links I have configured on my map to show properly when used in the template. Everything else works great. I tried several and no luck. See image below.
image

Here is a link to the map I am using for popups, maybe it has something to do with the way I configured them?:
http://arcg.is/1PhUvW9

Expose a geocoding match threshold or match level in configuration

Instead of having the app jump to the next valid level of geometry when the user enters an invalid address, we've had one customer who would instead like to have the app provide some sort of prompt or warning if either incomplete address information is entered or if an address is not resolved. This prompt would be displayed if the entered address does not meet a configurable match threshold.

Custom Geocoder

I tried setting the default geocoder to something other than ESRI's World Geocoder and it doesnt seem to stick and reverts back to it. Is there another location where it needs to be set besides the commonconfig.js?

geocode: [{
url: location.protocol + "//utility.arcgis.com/usrsvcs/servers/a88702314a8a48cb84d0a6305f1adcb6/rest/services/locators/RLIS_Locator/GeocodeServer"
}]

Crashes on mobile

Chrome and Safari crashes on a mobile device when trying to query a location.

Couldn't add another geocoder/locator to this template

Hi,
I was working with one of the user's and I could not get this to work using a custom Geocoder URL. I have downloaded this template and hosted it on my server.

I tried adding my own url under DEFAULT.JS FILE. --> HELPERSERVICES --> GEOCODE.url but this doesn't seem to work.

I also tried replacing world geocode url from commonConfig.js file but no luck over there.
When I debugged in search.js file it only adds World Geocoder to the Search sources. Do I need to change anything else anywhere? I do not want to use search widget directly on my layer.

Would you be able to test this when you get a chance?

Thanks,
Akshay
Esri Technical Support

enhancement request - legend

With more and more layers being added to our map, it'd be nice to have a legend so users'd know what are those symbols. What do you think?

Error "layer.layerObject is undefined"

I'm getting a "layer.layerObject is undefined" error when launching the map on FF 31 through both Esri's hosted application and when I setup the map to be hosted locally on my webserver. Chrome 36 throws a "Cannot read property 'layerInfos' of undefined".

Here's the map:
http://bit.ly/1o7qOLI

Here's the ESRI hosted webapplication with the error:
http://kingcounty.maps.arcgis.com/apps/InformationLookup/index.html?appid=400507e78aab484dbaa83b07a83afdb5

Having trouble tracking down the cause.

Portal storage layer

Unable to select a point layer in the web map. Had a point layer in map Was using Portal 10.3.

image

Update config panel to use the new multilayer picker

Example Structure
{
"type":"multilayerandfieldselector",
"fieldOptions":{
"supportedTypes": [
"esriFieldTypeString"
]
},
"layerOptions":{
"supportedTypes":[
“FeatureLayer”
],
"geometryTypes": ["esriGeometryPoint", "esriGeometryLine"],
},
"fieldName":"searchLayer",
"label":"Select search layer"
},

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.