I have this piece of code that is taking a graphic drawn by the user and creating a shapefile.
Right now it creates the .dbf .shp .shx and the user can download it.
What I want is a .prj file to be created and the whole thing be zipped up....
Anyone know how to do this in JavaScript?
See attached
Thanks in Advance if someone can help.
For the projection you would need to write something like this to a text file (for Mercator):
PROJCS["WGS_1984_World_Mercator",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],UNIT["Meter",1.0]]
You can see about writing textfiles here :
jquery - Writing data to a local text file with javascript - Stack Overflow
And name it the same as the shapefile and filetype .prj
Thanks Paul...going to get at this soon....but good to know it can be done...sure I will have some future questions.