Git Product home page Git Product logo

esri / developer-support Goto Github PK

View Code? Open in Web Editor NEW
267.0 103.0 164.0 143.55 MB

Proof of concept developer code and samples to help be successful with all ArcGIS developer products (Python, NET, JavaScript, Android…). The repository is designed to be an exchange for sharing coding conventions and wisdom to developers at all skill levels.

License: Apache License 2.0

C++ 1.94% Java 5.14% C# 47.61% Python 5.88% HTML 18.36% R 0.11% Objective-C 0.95% JavaScript 13.90% CSS 0.39% C 0.39% QML 1.80% PLSQL 0.23% PHP 2.20% QMake 0.01% Go 0.03% Swift 0.17% Kotlin 0.24% TypeScript 0.19% Jupyter Notebook 0.47% Batchfile 0.01%
web-development data-management spatial-analysis native-development

developer-support's Introduction

Welcome to Developer Support

This is a place to collaborate and support GIS developers working with Esri's developer libraries.

Resources for troubleshooting as well as proof of concept samples to support developers! Much of the code contained here is samples created by Esri staff to help developers understand how to program against all aspects of Esri’s Location Platform – desktop, mobile devices and for the web. It’s a great place to copy and paste code you may need or search for lesser-known methods or classes to see how they are implemented. Despite the name however, this repository is not intended as a place to replace community and paid support offered by Esri. For community support, check out our Esri’s GeoNet site. For paid support check out http://support.esri.com or contact your regional distributor.

Using the samples

The easiest way to use these samples without using Git is to download the zip file for this repository. The Download Zip link can be found in the top right of the repository by clicking the green Clone or download button.

Notes:
  • The resulting zip archive will contain ALL samples for this repository.

  • In Windows, before you unzip, you may need to unblock the archive. Right-click the zip file, select Properties, then select Unblock.

  • The general organization of the repository is: [Technology Platform]-[Language]/[Sample Name]

  • Many of the samples will require installation of supporting software (e.g. a respective SDK). See the sample readme for dependencies.

For more information regarding the technology platforms, languages, APIs, and SDKs, please refer to the documentation at: ArcGIS for Developers - Documentation

Contributing

Esri welcomes contributions from anyone and everyone. Please do not contribute code you did not write yourself, unless you are certain you have the legal ability to do so. Also ensure all code contributed can be licensed under the Apache License 2.0. For more details please see our guidelines for contributing.

Licensing

©2015-2020 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 file.

Welcome to our toolbox!

alt text

Esri Staff

To get involved, you have two options:

  1. if you currently work in tech support and prefer to get familiar with GitHub using the fork and pull model, you can contribute as much as you please (just like the rest of planet 🌏) . some people like doing things this way because they know they can't do any harm when they don't have permission to push their own code upstream.

  2. that said, we do want to encourage more folks to take on a maintainer role. so we highly recommend that you Request to join the Support Services team to start upping your game and get push access.

the only prerequisites are:

  • you have to be currently employed by Esri
  • you must have already reviewed someone elses pull request or submitted one of your own (even if its just a simple typo fix).

developer-support's People

Contributors

akshayharshe avatar andr7430 avatar aruizga7 avatar banuelosj avatar benstoltz avatar briantwatson avatar bsnider avatar claudeshyaka-esri avatar goldenlimit avatar guo7711 avatar hanhansun avatar hhkaos avatar hwelch-fle avatar jgravois avatar kgalliher avatar kgerrow avatar lboyd93 avatar ldanzinger avatar marieashley avatar marlak avatar noashx avatar nohe427 avatar scmarth avatar seria1 avatar shrirambhutada avatar tsimons6 avatar wellsofthewest avatar woriginales avatar xlt208 avatar zxwandrew 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  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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

developer-support's Issues

start using 'master' branch to host live web content

on 8/17/2016, GitHub started supporting static website hosting directly from the master branch.
https://github.com/blog/2228-simpler-github-pages-publishing

it would probably be a good idea to take advantage of the new setting and make sure master is once again the default branch for the repo.

there's a sneaking other part of me that considers the way we have things set up now as a fail-safe (because its harder to accidently push directly to upstream gh-pages following Stack Overflow samples blindly), but i think the cons outweigh the pros.

delete 'master' branch and just make 'gh-pages' the default branch

disclaimer: i just finished cleaning up another merge conflict to get master and gh-pages and sync.

my original plan was to follow up and write documentation to explain to people some do's and donts for managing multiple branches and keeping them synchronized, but i think it'd be ~3x easier to just get rid of the master branch entirely and make gh-pages our default branch.

what is gh-pages anyway?

naming a branch gh-pages is just a handy shortcut provided by github to let them know that we'd like them to be start serving the content in the branch as a static webpage.

documentation: What is Github pages?

source code:
https://github.com/Esri/developer-support/blob/gh-pages/web-leaflet/browserify/index.html
live website:
http://esri.github.io/developer-support/web-leaflet/browserify/index.html

if a file is not present in the gh-pages branch, it is not possible to run it as a live sample. the fact that we encourage folks to include a Live Sample link in their README is another handy shortcut, but it doesn't provide any magic.

but what about samples that have nothing to do with the web?

the good news is, they are perfectly happy to live in a branch named gh-pages too!

what will we have to do differently?

basically, we'll keep doing our own work in unique feature branches (named: patch or my-cool-new-sample) and start creating pull requests to compare them with gh-pages whether they are a website, an ArcObjects code snippet or a Python script.

thats it.

why were we ever maintaining two different branches if they are supposed to be identical?

i have no idea.

i've created an 'issue' for this because i am looking for feedback from anyone and everyone here. my personal opinion is that we are doing more harm than good by asking folks to try and keep two different authoritative branches in sync, but i am not the boss.

document guidelines for contributing

i suggest we enforce a fork and pull model for this repository (or at a bare minimum require submitting Pull Requests to merge into master from dedicated feature branches) and explicitly prohibit that contributors push directly to the master branch.

https://help.github.com/articles/using-pull-requests/

this will be beneficial for several reasons

  1. a second set of eyes helps spot errors and gives an opportunity to improve both code and documentation quality.
  2. it helps avoid merge conflicts
  3. its good practice for contributing to strangers projects and working on a codebase which requires more extensive collaboration.

its also important that we document guidelines that explain what is required in order to get contributions merged. particularly the inclusion of enough contextual information in a readme specific to an individual sample to explain to anyone perusing the repository what it should be able to help them accomplish.

doc on submitting pull requests

can someone take a stab at writing up documentation (similar to this) which outlines the general steps for submitting a pull request?

  • fork the repository
  • clone a copy of the repository locally
  • make sure local master is up to date with the commits upstream
  • create a new feature branch
  • add a new code sample, and once youre satisfied with the addition, commit the change
  • push the change to your fork
  • use Github to create your Pull Request
  • participate in the discussion with an open mind during code review, utilizing additional commits to make additional alterations
  • (optional) squash unique commits down into one when everyone is happy with the PR

update project readme w/ info for the public

in addition to providing information geared toward internal contributors, contextual information needs to be added for the public (ie: info for consumers in addition to contributors).

  1. we need to explain that this is a random collection of samples that have proven useful in individual situations, but that we make no claims as to their fitness otherwise (ie: can people call into support if they don't work?)
  2. we should point people to other community resources for training and assistance (even if we're comfortable with the public logging an issue when a sample doesn't work for them). I'm thinking specifically of GeoNet and GIS.stackexchange.com but there may be others.
  3. we need to explain the general steps to work with the content (pretty much just download the zip and start digging)

to put it succinctly, the first thing people see needs to appeal to the lowest common denominator.

Error getting token

I keep getting this error and all I've done is replace the username and password variables.

Traceback (most recent call last):
File "C:\Users\[email protected]\Desktop\Kingery\Python\itemSizeCSV\itemSizeCSV.py", line 34, in
t= ItemCounterHelper.agolAdmin(user,pw)
File "C:\Users\[email protected]\Desktop\Kingery\Python\itemSizeCSV\ItemCounterHelper.py", line 22, in init
self.__token, self.__ssl= self.__getToken(username, password)
File "C:\Users\[email protected]\Desktop\Kingery\Python\itemSizeCSV\ItemCounterHelper.py", line 75, in __getToken
return jres['token'],jres['ssl']
KeyError: 'token'

Any thoughts?

Value error while pinging

Hello,

I'm testing out this script and am getting a value error stemming from this line:

ping

The traceback reads:

ptrace

Any ideas? I'm using Python 2.7...I might be wrong, but the problematic line looks like 3.X formatting, correct? If so, how could this line be modified for 2.7? Any feedback is greatly appreciated!

minor error in 'SUBMITPR.md'

Clone a copy of the repository locally by clicking the "Clone in desktop" or "Download ZIP" button

or "Download ZIP" button

when selecting 'Download ZIP' only the current state of the files in the repository are packaged, commit history and information about other branches is stripped out (more info here).

anyone new game for making this small change and submitting a pull request?

remove 'Developer Support' as a group with push access to this repo

everyone knows im all for open source and 'defaulting to open', but i think we went a bit overboard giving the entire Developer Support team push access to this repo and consequently automatically subscribing them to email notifications regarding its activity.

why?

  1. i've received a couple emails from users who felt the notifications were spam.
  2. i think some folks get more intimidated about contibuting knowing that their comments, etc. will be email blasted to a big group.
  3. lets face it. github is cooler when its nitch.

obviously there are pros and cons to both approaches, but my general opinion is:

  • make repos public (or at least public to the entire arcgis org)
  • only grant push privileges to those that have explicitly declared interest in contributing/maintaining

to do:

  • create a new smaller write access team composed of the folks who've already jumped in and helped, or expressed interest
  • trim Developer Support team down to folks who have either already contributed or expressed interest.

its not hard for others to fork and pull if they want to particate and add more folks to the team in the future.

i'd like to give this issue a week or so to collect other comments to see if anyone else feels differently.

(this is more or less a duplicate ArcGIS/esri-support-sql-repository/issues/3)

doc on merging pull requests

can someone take a stab at writing up documentation (similar to this) which outlines what to check for prior to merging pull requests?

  • use something like this handy live markdown editor to copy-edit
  • if code is present, run it and confirm it generates the expected outcome
  • make sure contribution doesn't contain any unnecessary dependencies or other 'bloat'
  • make sure documentation is sufficient, and that both a README and inline code comments are present
  • make sure the proposed 'diff' doesn't alter anything else unexpected in the repository

Unable to merge or fast forward between gh-pages and master branches

I just submitted pull request #210 containing a JS sample with a sample URL to our gh-pages branch. After the PR was approved I was planning to fast forward or submit another PR between gh-pages and master so my readme sample URL was correct per #61. However it seems that an auto-merge is not possible here #211. Did I do something wrong here or is our master and gh-pages branch out of sync?

random issues

a few random issues we discussed last night:

  • perhaps the pythonistas want to rearrange the directory structure for desktop python samples, online samples and server admin samples that don't actually import arcpy?
  • desktop SDK needs to come up with a convention for what exact code they will include in a sample generally and some generic documentation that explains how to wedge it into a new visual studio project so that they aren't importing entire visual studio solutions for code samples that are typically quite small.
  • also, despite the fact that the content is meant to be helpful to developers, there's no reason that the documentation can't have personality too. check out this awesome gist from our brother @ngoldman in PDX for a perfect example of technical doc + 🍰

you can find my slides here

Unable to update Layer Definition JSON in Services (AGOL)

I am attempting to update a list of values inside a coded value domain. Before touching the original JSON, I ran it through JSONLint to ensure that I had no syntax issues or other issues. My JSON was confirmed valid.

VALID JSON

I keep getting "Invalid definition for 'LastEditDate'." and "Invalid definition for ESRI.ArcGIS.SDS.Metadata.EditingInfo" errors.

Errors

How do I get past this hiccup?

ORIGINAL JSON Pothole Patrol.txt

Upated JSON Pothole Patrol JSON.txt

runtime-android/sync-gdb-in-background missing res folder

I am trying to update the sync-gdb-in-background android demo, beyond adding the gradle wrapper and updating the ignore list there are references to resources but the res directory is missing. I can try to piece together a res file based on what the project needs, but best if we can introduce a proper res folder.

Two license files

Is there a reason that we have a LICENSE and a license.txt file in the root of this project?

I might just be confused on the licensing...

add links in contributor help to 'github guides'

i just found this great site which breaks out a variety of essential github/git topics into bite sized articles and videos. its a great resource so i think it'd be a good idea to include links from our own help.

anyone up for tackling this 'enhancement'?

Please add guidelines for contributing samples in the main README.md

It would be helpful if we published the basic format that was expect for the samples that people want to contribute. Or better yet, even a template.

e.g.

TechnologyCategory/Folder/xxx
TechnologyCategory/Folder/README.md

README.md could contain things like...

  • How to get it working
  • Requirements
  • See it live here...

Few other ideas: A high-level README.md in each TechnologyCategory folder would be helpful to see a list of what's there.

Thanks,
AL

condemn force pushing

we should mention explicity in the readme that pushing your own commits directly to master is strongly discouraged and that force pushing is strictly prohibited, ideally going as far as mimicing the exact rules Level lists for their OPEN open source projects.

i'd even recommend we go a step further

Search widget is under a div

Going to fix shortly just wanted to add a reminder.

Sample:
web-js/search-widget-with-customized-geocoder-server

image

AppStudio Folder

Hey guys!

I was just chatting with @esoekianto and @bsnider about possibly creating a folder for appStudio (qml) samples. It just went into beta 3 and started coming in all the support channels so we thought it might be a good idea. Any thoughts? 💭

Empty Zip File

Hello,

I've been using this script daily for two weeks without problems, but since yesterday I keep getting an empty zip folder as my result. I've tried it with several different services and it's happening regardless. Any ideas? Feedback greatly appreciated!!!

suggestions for improvements to the 'Join Data Source' sample

a customer at UC just showed me a really cool sample in here where we show how to create a join on the fly and create a new renderer using DynamicLayers here but she was having a hard time understanding what was going on.

in helping her digest the sample, i have the following suggestions for improvements:

  • JS and CSS need to be formatted/tabbed consistently
  • the hardcoded reference to @AkshayHarshe 's proxy needs to be removed
  • the sample needs inline code comments to describe whats going on. particularly that its up to the developer to know a workspaceID because its not something that is exposed by ArcGIS Server

the readme needs:

  • formatted (so that the numbered bullets each have their own line)
  • links need to be included to the relevant ArcGIS Server documentation for setting up DynamicLayers and workspaces.
  • we need to link to the live gh-pages sample from the readme

is anyone up for tackling this? it needn't be the job of the original author.

Create AppStudio Samples

@bsnider has been tasked with creating AppStudio Samples.

The samples are designed to showcase a particular component (or small number of related components) without the clutter of a full app. Users should be able to copy qml from a sample (preferable taking a whole qml file) and drop it into their own app.

These are the samples he needs:

  • Edit points, lines and polygons –Edit existing features and allow the user to delete and move vertices of existing features, and delete whole features.
  • Attribute editing – Select an existing feature and edit its attributes.
  • Related record editing – (may be a part of the previous sample or separate) Select an existing feature and edit the attributes of related records.
  • Capture lines and polygons - Capture a new line or polygon feature with either screen taps or GPS/Location coordinates
  • Snapping line features - (may be a part of the previous sample or separate) Capture a new line or polygon feature by tapping on existing feature vertices.

We also need to strive to emphasis offline capabilities, but also want to avoid filling every sample with download geodatabase code. Consider variations amongst the samples listed above, for example in some you may pre-supply a geodatabase, others may download and some can edit online. Perhaps if number 4 in the list is offline, 5 can be online (as it shows similar functionality).

@bsnider and I will be discussing this in our group meetings.

Please mention which one you would like to work on when you begin working on it.

Looking for help from @goldenlimit @marlak @gdhakal @guo7711 @andr7430 @natas333x2

update this sample to use on style events

Popup in side panel Time for some Updates 😄

  1. use on style events instead of connect.
  2. update comments to be more relevant

For example 1:

function initializeSidebar(map) {
                var popup = map.infoWindow;
                //when the selection changes update the side panel to display the popup info for the 
                //currently selected feature. 
                connect.connect(popup, "onSelectionChange", function() {
                    displayPopupContent(popup.getSelectedFeature());
                });
                //when the selection is cleared remove the popup content from the side panel. 
                connect.connect(popup, "onClearFeatures", function() {
                    dom.byId("featureCount").innerHTML = "Click to select feature(s)";
                    registry.byId("leftPane").set("content", "");
                    domUtils.hide(dom.byId("pager"));
                });
                //When features are associated with the  map's info window update the sidebar with the new content. 
                connect.connect(popup, "onSetFeatures", function() {
                    displayPopupContent(popup.getSelectedFeature());
                    dom.byId("featureCount").innerHTML = popup.features.length + " feature(s) selected";
                    //enable navigation if more than one feature is selected 
                    popup.features.length > 1 ? domUtils.show(dom.byId("pager")) : domUtils.hide(dom.byId("pager"));
                });
            }

For example 2:
An ArcGIS Online web map isn't being used in this sample

                //Create a map based on an ArcGIS Online web map id 
                var map = new Map("map", {
                    basemap: "topo",
                    center: [-98.57, 39.82],
                    zoom: 4,
                });

multiple maps connected sample needs tweaked.

we need to remove the Leaflet.markercluster readme, examples, jake buildfile and other bloat from the multiple maps connected sample. is the plugin available via CDN? if not, whats the minimum required to make our own sample run?

@bsnider, you up for cleaning this one up?

Create gh-page to view samples live

I don't think I have access permissions to create a gh-page. It's always nice to view a live demo of a sample instead of reading through lines of code. @phpmaps Do you have access?

ES2015 Samples

So as some of you may be aware there is a new version of ECMAScript out known as ES2015. It introduces new syntax and some different ways of developing with our JS api. I've been working on a few samples. I propose creating a new folder to hold these samples.

Thoughts?

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.