Community
All Communities
Products
ArcGIS Pro
ArcGIS Survey123
ArcGIS Online
ArcGIS Enterprise
Data Management
Geoprocessing
ArcGIS Experience Builder
ArcGIS Web AppBuilder
ArcGIS Dashboards
ArcGIS Field Maps
ArcGIS Spatial Analyst
All Products Communities
Industries
Education
Water Resources
State & Local Government
Transportation
Gas and Pipeline
Water Utilities
Roads and Highways
Telecommunications
Natural Resources
Electric
Public Safety
All Industries Communities
Developers
Python
JavaScript Maps SDK
Native Maps SDKs
ArcGIS API for Python
ArcObjects SDK
ArcGIS Pro SDK
Developers - General
ArcGIS REST APIs and Services
ArcGIS Online Developers
Game Engine Maps SDKs
File Geodatabase API
All Developers Communities
Global
Comunidad Esri Colombia - Ecuador - Panamá
ArcGIS 開発者コミュニティ
Czech GIS
ArcNesia
Esri India
GeoDev Germany
ArcGIS Content - Esri Nederland
Esri Italia Community
Comunidad GEOTEC
Europe
Asia Pacific
All Global Communities
All Communities
Developers
User Groups
Industries
Services
Community Resources
Global
Events
Learning
Networks
ArcGIS Topics
Products
View All Communities
ArcGIS Ideas
GIS Life
Community Resources
Community Help Documents
Community Blog
Community Feedback
Member Introductions
Community Ideas
All Community Resources
Sign In
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Show
only
|
Search instead for
Did you mean:
Cancel
Home
:
All Communities
:
Developers
:
JavaScript Maps SDK
:
JavaScript Maps SDK Questions
:
Polyline feature layer from JSON
Options
Subscribe to RSS Feed
Mark Topic as New
Mark Topic as Read
Float this Topic for Current User
Bookmark
Subscribe
Mute
Printer Friendly Page
Select to view content in your preferred language
Translate Now
Polyline feature layer from JSON
Subscribe
2752
2
04-17-2013 12:23 PM
by
AndrzejMilosz
Deactivated User
04-17-2013
12:23 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
In my application I want to create a polyline feature layer from this JSON file:
http://ibikekrakow.com/wp-content/themes/bike/js/green.js
Is this file good for this?
I found an example how to create a feature layer from points:
http://gis.stackexchange.com/questions/8896/feature-layer-with-ondemand-mode/8912#8912
What is different in creating a polyline layer?
Tags
(2)
Tags:
javascript
web_developers
Reply
0
Kudos
All Posts
Previous Topic
Next Topic
2 Replies
by
derekswingley1
Deactivated User
04-17-2013
04:02 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
You can do the same thing with lines, just need to tweak the JSON you pass to the feature layer constructor.
Since your source file is GeoJson, you need to convert to the esri json format as well. I used this:
https://github.com/Esri/geojson-utils
Here's a working example:
http://jsfiddle.net/ZdLF7/
Note that I included the GeoJson converter JS directly from github. If you use that code to convert your GeoJson you should download and host that .js file yourself.
Reply
0
Kudos
by
AndrzejMilosz
Deactivated User
04-20-2013
03:35 PM
Mark as New
Bookmark
Subscribe
Mute
Subscribe to RSS Feed
Permalink
Print
Report Inappropriate Content
That works, thank you!
Is there a possibility to save this feature layer (created from JSON) in ArcGIS geodatabase?
Reply
0
Kudos
Post Reply