I am trying to find a sample or documentation on how to add my local shapefile to my map using only javascript. Can this be done?
Load A Shapefile Layer
Hi Michael,
We cannot render shape file directly in client side by JavaScript.
So I think if you want to implement that by WebApi edition, maybe you can create JavaScript function to “upload” local file, then sent to server side by HttpPost function, then render that by MapSuiteCore,
We don’t have related sample because we mainly shows map render and spatial query related functions, your requirement is not strictly map function, but I think it can be implemented by WebApi.
Wish that’s helpful.
Regards,
Don
Thanks Don,
Would it be possible to do if I had a GeoJSON file instead of shapefiles?
Hi Michael,
For our WebAPI edition, its client side mainly work on render the data from server side. So I think if you want to render data in client side, you should want to do some research about your client side library like OpenLayers, Leaflet or KendoUI, to see whether the library you are using support render GeoJSON by JS. I think they should have some samples about this in their mainpage.
And if you want to get more help about this problem, you can try to contact your sales, we also provide professional service to help user research new requirement or implement them.
Regards,
Don