0

I'm trying to display an SHP file into openlayers 3 map. I found a library to read both .shp and .dbf files, so I can read features and attributes from the files. Now I want the client to drop those files to the map using DragAndDrop interaction.

Is possible to do this?

Is there an event similar to bellow example?

dragAndDrop.on('file-drop', function(event){
  // Do something with event.file or event.someKey
});

In this event (if exist) should I parse the files, get features and add to map manually?

Also if this kind of event exist what would happen with addfeatures event.

Will be triggered??

0

I think you could use ondrop event of HTML, then get Geojson data from that library you found, and then create a vector layer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.