GeoSpatial Training Services Newsletter
Issue: # 1
May 4th, 2015

10 Anniversary Sale Begins Today

 

Hard to believe we've been in business 10 years this month! 

 

In celebration our annual anniversary sale begins today and runs through May 31st!  

 

As always the sooner you register the bigger the savings.

 

May 4th - May 10th - Save 20%

May 11th - May 24th - 15%

May 25th - 31st - 10%

 

Enter the discount code 'anniversary' when checking out online or write in the code when registering using our registration form.

 

____________________________________________________

 

Beginning Today!

Seats Available

7 Instructor Guided, Self Paced, Online Classes 

 

May 4th - 22nd unless otherwise noted

 

Programming ArcGIS with Python Workshop   

$715

undefined
 

Advanced ArcGIS Programming with Python 

$715
undefined

 

 

Building Custom ArcGIS Server Applications with JavaScript  

$715

undefined 

 

Advanced ArcGIS Server Development with JavaScript   May 4th - 29th

$715

undefined

 

Open Source GIS Bootcamp  

May 4th - 22nd

$715

undefined

 

Introduction to ArcGIS Online 

May 4th - 15th
$250

undefined 

 

Intermediate ArcGIS Online 

May 18th - 29th
$450

undefined

____________________________________________

Live Training Events

 

Fundamentals of Google Earth Pro
Austin, TX (hosted by TNRIS)
May 7th
 
$360 


Denver, CO
June 15th and 16th
$760 
undefined

Portland, Denver
$380 

Portland, Denver 

$760 

May 26th and 27th
$760

undefined 

 

Bozeman, MT
August 10th and 11th
$760
undefined 


 

Bozeman, MT
August 12th and 13th
$760 
undefined

 

 

_______________________________________________ 

ArcGIS Server - Understanding the Proxy Page and CORS

 

One thing that appears to cause more confusion than anything else among beginner users of the ArcGIS Server API for JavaScript is the use of the proxy page and CORS. Let's see if we can clear up that confusion once and for all.

 

Before we get into the actual mechanics of working with the proxy page and CORS, let's briefly outline what problem they are trying to solve.

 

In web development, if you build an application on your web server at http://www.mywebserver.com and then try and request a resource residing on another server (such as a map service running on ArcGIS Online) then the default behavior is to disallow the request. Why? Because it is considered a security risk. This "same origin policy" is there to prevent a malicious script on one page from obtaining access to sensitive data on another web page.

 

Which is all well and good as a general principle, but really gets in the way of things when we're building web mapping applications which routinely pull in all sorts of different services residing on different hosts.

 

There have been a number of different workarounds for this, but the ones that interest us most as ArcGIS Server API for JavaScript developers are CORS and the proxy page.

 

CORS stands for Cross Origin Resource Sharing. It is an extension to the standard HTTP protocol that allows servers to use new headers in their requests (Origin, and Access-Control-Allow-Origin) which explicitly allow access to resources on other servers that would otherwise have been forbidden by the same origin policy.

 

In order for your web application to use CORS, two things have to happen:

  1. Your browser must support it. Many modern browsers do, but you can check yours at http://caniuse.com/#feat=cors
  2. The server that hosts the resource that you want must also support CORS. ArcGIS Server 10.1 and above supports CORS out of the box, but there are still many servers out there (including some of Esri's own servers) that don't.

Assuming both these things are in place, then you are good to go.

 

If you cannot rely on CORS, then you need to install and configure a proxy page on your web server. Instead of sending the request for the remote resource directly to the web server that hosts it, your application sends the request to the proxy page on your server first, and the proxy then forwards the request to the remote server. It then relays the response returned by the remote server directly back to your application.

 

Because the connection is made to your server, and the data from the resource your requested comes back from your server, the browser does not complain about your web application and the resource that you are interacting with being on different hosts. It's really that simple!

 

So now you know how the proxy works, and all you need to do is pick the right one for your web server, configure it, and tell your application where it is. Thankfully, Esri's documentation on that is really good.

 

Hopefully the time will come when everything supports CORS, but until then you need to make provision for those browsers and ArcGIS servers that don't by using the proxy page.

_______________________________________________


Join the GIS Training & Education LinkedIn Group

 

This group provices announcements and links to GIS, GPS, and other geospatial technology training and education events and seminars. Please feel free to post announcements of traditional face to face instructor led, or e-learning opportunities available over the web. 

 

Join the Group 

 

____________________________________________

 

Python Basics Webinar Recordings Available


Please visit our blog to catch up on our 7 Python Basics Webinar recordings.  

  

_______________________________________________________

 

10 Common Python Errors of Beginning ArcGIS Programmers

 

Over the years I have taught hundreds of beginning level Python programmers how to automate their ArcGIS geoprocessing tasks.   Needless to say I have seen all sorts of errors.  But there are some common errors that I see over and over again.  So if you're a beginner level Python programmer working with ArcGIS hopefully this will help get you over the hump.  Below you will find my list of the 10 most common errors in no particular order.

 

Click here to read the 10 common Python errors that beginners make.

GeoSpatial Training Services provides customized e-learning and instructor led GIS training and communication solutions that assist our clients in achieving excellence in the geotechnology industry.

 

Sincerely,

 


Eric Pimpler
GeoSpatial Training Services, LLC

Social

Popular Courses 
GISCI