Comments (8)
@AminBangash since your question is about the ArcGIS API for JavaScript it's best to post those questions on GeoNET: https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript.
For referencing a local file you need a url such as: https://localhost/test.csv. I believe you'll also need a valid SSL certificate or you'll get an error.
Another option is to host your csv in a github repo for testing purposes.
[Edit]
One other option for testing is to use a simple CSV string as shown in this codepen: https://codepen.io/andygup/pen/LYGRqYj?editors=1000
from angular-esri-map.
@AminBangash since your question is about the ArcGIS API for JavaScript it's best to post those questions on GeoNET: https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript.
For referencing a local file you need a url such as: https://localhost/test.csv. I believe you'll also need a valid SSL certificate or you'll get an error.
Another option is to host your csv in a github repo for testing purposes.
[Edit]
One other option for testing is to use a simple CSV string as shown in this codepen: https://codepen.io/andygup/pen/LYGRqYj?editors=1000
thanks andy for your response, but my file is located inside a local drive like C: or D: so i can't use http as it is for a server.
from angular-esri-map.
my url is like for csvlayer on local c:drive, i.e
csvUrl="file://C:Users\Desktop\test.csv"
let csv =new CSVLayer({
url: csvUrl,
renderer: csvRenderer //for drawing point
})
map.add(csv)
from angular-esri-map.
Hey @AminBangash yes, you'll need to use the same approach as demonstrated in the codepen above: create a blob from the file input and use that value in the CSVLayer.url
property. Here's another codepen that demonstrates the concept: https://codepen.io/andygup/pen/KKVNXGV?editors=1000.
To test it, create a test.csv
file using this data:
time,latitude,longitude,desc
2019-06-28T11:17:31.734Z,39.0,-104.8409,'test'
from angular-esri-map.
Hey @AminBangash yes, you'll need to use the same approach as demonstrated in the codepen above: create a blob from the file input and use that value in the
CSVLayer.url
property. Here's another codepen that demonstrates the concept: https://codepen.io/andygup/pen/KKVNXGV?editors=1000.To test it, create a
test.csv
file using this data:time,latitude,longitude,desc 2019-06-28T11:17:31.734Z,39.0,-104.8409,'test'
Thank you very much @andygup you make my day. :)
from angular-esri-map.
Hey @andygup if i have to upload multiple files, will it plot like that?
from angular-esri-map.
Not automatically, you'll need to write the code to handle that.
I'm going to close this issue @AminBangash since the original question has been answered and it's not related to Angular. If you have follow-up questions related to JavaScript and the ArcGIS API for JavaScript the best place to post them is on GeoNET.
Please note: this repository is now retired and will soon be archived. It's been replaced by modern alternatives - more info can be found here.
from angular-esri-map.
Not automatically, you'll need to write the code to handle that.
I'm going to close this issue @AminBangash since the original question has been answered and it's not related to Angular. If you have follow-up questions related to JavaScript and the ArcGIS API for JavaScript the best place to post them is on GeoNET.
Please note: this repository is now retired and will soon be archived. It's been replaced by modern alternatives - more info can be found here.
Thanks @andy for your help. I have posted my question there.
from angular-esri-map.
Related Issues (20)
- Cannot use popupTemplate functions HOT 4
- Bower package not working but NPM Is HOT 3
- Critical dependency: the request of a dependency is an expression HOT 5
- Access ArcGIS Online items using OAuthentication - 4.3 HOT 10
- esriLoader.require()'s promise resolve an array failed HOT 1
- Vector Tile Layer not working HOT 2
- Graphics Layer Events Not Raised HOT 4
- Update README w/ status and up to date info on Angular 2(+) HOT 5
- Calcite bootstrap moved our cheese and broke gh-pages site HOT 2
- Need information on displaying routes HOT 7
- Minor: Broken CSS in the doc HOT 2
- AngularJS goes into Long Term Support on July 1, 2018 HOT 2
- Map loads only certain tiles HOT 4
- GraphisLayer extent ?? HOT 7
- Short video tutorial HOT 3
- Testing the ArcGIS online sample shows error view.then is undefined HOT 4
- This repository is retired. It will be archived soon (Q4 2020) HOT 1
- Is there a wrapper for Angular2+ HOT 1
- File Uploading to csv layer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-esri-map.