0

Is it possible to set the GPS location of a picture through JavaScript? While using Google I found a lot of ways to display this information but non on how to set it.

Olivier Payen
  • 15,198
  • 7
  • 41
  • 70
PhysX
  • 128
  • 1
  • 10
  • 2
    You need to provide a little more detail as to what you're trying to do. – Dutchie432 Dec 09 '10 at 15:15
  • This question doesn't make sense yet. Can you clarify, maybe show an example? – Pekka Dec 09 '10 at 15:15
  • Sorry about that. Basically what I want to do is set location data on the picture. If you would then place it online on Flickr it would show on a specific location on the map. Not every camera has this GPS capability though, so I would like to add this information through JavaScript. Hope that makes more sense. – PhysX Dec 09 '10 at 15:20

2 Answers2

1

You can read EXIF data to get the lat/lng of an image but you certainly can't write it using Javascript

Olivier Payen
  • 15,198
  • 7
  • 41
  • 70
  • Is that because of security reasons? If it is, is there another way of writing that data, maybe through AS3? – PhysX Dec 09 '10 at 15:25
  • 1
    Yes, for security reasons there is no permission for Javascript to write to the hard drive in the client machine. I don't know if it's possible through AS3 but it should be possible with Silverlight, see http://stackoverflow.com/questions/3517094/read-and-write-exif-data-with-silverlight – Olivier Payen Dec 09 '10 at 15:32
  • This is not longer true... `FolderHandle` provide developer with option to write data to harddisk... – Akxe May 02 '23 at 11:16
0

If you're open to writing a Firefox extension, you would have additional privileges, and you could figure out how to manipulate images locally.

pc1oad1etter
  • 8,549
  • 10
  • 49
  • 64