Select to view content in your preferred language

Zip code Layer using java script without having zip code boundary points?

3432
3
01-06-2016 01:40 AM
AnshumanSharma
New Contributor

Can I create Zip code Layer using java script without having zip code boundary points? I have some analytical data according to zip code i want to plot zip codes with different color based on my analytical data.

0 Kudos
3 Replies
ChrisSmith7
Frequent Contributor

You need a zip code layer - you can find a shapefile and push a map service out to access in the JSAPI. Word of advice, though, zip codes aren't really polygons in the truest sense - they are delivery points. You can find them in polygonal format, but they are relatively poor for associating data because they change so frequently; additionally, zip codes may not be captured spatially as they sometimes reference a building, or a floor of a building, etc. Again, they are delivery points...

The US Census Bureau created something called ZCTAs (Zip Code Tabulation Areas) to create aereal features - ZIP Code Tabulation Areas (ZCTAs) - Geography - U.S. Census Bureau

Here's where you can download the 2015 ZCTAs:

ftp://ftp2.census.gov/geo/tiger/TIGER2015/ZCTA5/

From here, you can create a map service and push to server/AGOL, if ZCTAs work for you. Now, ZCTAs and zips aren't the same thing, but they may work for you, depending on your data - check out ZIP or ZCTA?

Also, you may find an Esri Rest service from data.gov:

Search for a Dataset - Data.gov

I didn't see a nationawide dataset, though, but depending on your state...

AnshumanSharma
New Contributor

Thank you so much for your suggestion.

Actually I am new in ArcGIS Map Application. I am trying to build a web application using ArcGIS java script library. I have idea how to create base map, how to add points using feature layer.

But the problem is, i don't know how to add ZIP/ZCTA layer to my base map and what type of layer i have to chose for plotting Zip/ZCTA.

Is there any ESRI service that automatically create zip layer and i could map my data with it.

Or I would  have to create my own rest service that provide Zip/ZCTA delivery points.

If i have to create  my own service then what type of geometry(point/polygon/etc) and what type of layer  I will use to add.

Please suggest me how to proceed.

if you have any sample please provide me.

I also want to know how to use shape file (downloaded from the link provided by you) in java script.

If possible please provide me any contact number for further discussion.

0 Kudos
ChrisSmith7
Frequent Contributor

There may be zip/zcta services available - I couldn't find them anywhere easily. But, you can create your own map services from the links provided - here's some info on doing that:

Tutorial: Publishing a map service—Documentation (10.3 and 10.3.1) | ArcGIS for Server

The type of layer would be polygon - the server will know this already as this is information contained in the shapefile/feature class.

Here's a sample on thematically mapping data to counties:

Generate renderer | ArcGIS API for JavaScript

You say you're new to ArcGIS - are you familiar with coding/JavaScript? If so, you may want to stick with the JSAPI - it's more complex code-wise, but the real learning curve for you would be the GIS concepts. If you're not familiar with coding, I would suggest looking at the WAB (Web AppBuilder) - Web AppBuilder for ArcGIS | ArcGIS

I don't actually use the WAB, but my understanding is that it can be very basic, with no coding required, to fairly complex with custom widgets and configurations (there's an API for that, too - CSS framework—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers). To use the WAB, you need an Esri Organizational License (Web AppBuilder for ArcGIS | ArcGIS).

The JSAPI is actually free for a few uses, according to this thread, at least:

Is the ArcGIS Server JavaScript API free to use? - Geographic Information Systems Stack Exchange

But, unless there's a publicly available map service you are allowed to use, you'll have to create your own, and in order to do that, you would need something like ArcGIS Server or AGOL (ArcGIS Online) - Frequently asked questions—ArcGIS Online Help | ArcGIS

0 Kudos