Read Exif data from gallary images to gps point in Google map

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/4/2009 11:17:17 AM
Gravatar
Total Posts 5

Read Exif data from gallary images to gps point in Google map

Hello,

First of all i would like to compliment the developers of the CMS. It looks verry nice and the menus are verry easy to work with.

Then my "problem". What i would like is one content page where on the left or the right site the googlemap feature will show, and in the middle the image gallery. Ok so far no problem. But what i want is read the exif data in the jpg files to extract the gps locations and show the location in google map. Here is a website with this functionality and the nessecery js files to extract the gps locations: http://www.nihilogic.dk/labs/gps_exif_google_maps/

Because it is verry difficult (at least for me it is) to manipulate the source code, so i dont think it is possible to do it with the image gallary in the Mojo CMS. Therefore i've tried it exact the same way it is described on the given link. When i insert that on a normal HTML content page it is not working. Also when i insert it in the fragment1.htm file (offcourse without header etc) it is not working and at last i have tried to put it in the HelloWorldUserControl, also not working. The whole page just looks fine, no js errors are shown, its just that the google map wont change its marker. But when i run all of the pages outside Mojo it runs well.

Ive tried to make a button on the usercontrol and bound a js function to the onclick event. in the function it calls the var oMap = document.getElementById('ctl01_leftContent_ctl00_pnlMapCanvas'); if (gmctl01_leftContent_ctl00_pnlMapCanvas) { showGMap(gmctl01_leftContent_ctl00_pnlMapCanvas, 'utrecht', true, true, false, false, G_NORMAL_MAP, 13); } ... this works well.

So it is somehow possible changing the marker the static way, but not by reading it from the exif data in the jpg file.

Maybe someone can point me in the right direction, or can tell me what i'n doing wrong. Maybe i cant read the exif data straight from the jpg and have to safe it for every picture in the DB. I'm open for all suggestions.

Thanks, Chris

(sorry for my bad english)

11/3/2009 5:14:28 AM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: Read Exif data from gallary images to gps point in Google map

Hi Chris,

did you make any progress with this one?

I'm interested in users uploading images with EXIF GPS metadata in them and pinpoint them on the map.

11/3/2009 5:23:57 AM
Gravatar
Total Posts 116
http://www.zoomicon.com http://birbilis.spaces.live.com http://www.delicious.com/birbilis http://twitter.com/Zoomicon

Re: Read Exif data from gallary images to gps point in Google map

from that same guy, EXIF plugin for jQuery (think mojoPortal already uses jQuery, doesn't it?)

 

http://blog.nihilogic.dk/2008/05/jquery-exif-data-plugin.html

http://www.nihilogic.dk/labs/exifjquery/

----

else, can use the EXIF parser written in JavaScript:

http://www.nihilogic.dk/labs/exif/exif.js

that uses the following lib to read binary files:

binaryajax.js

11/3/2009 11:33:17 AM
Gravatar
Total Posts 5

Re: Read Exif data from gallary images to gps point in Google map

Hey George,

I stopped the whole Mojo thing. Not because i didn't like it, but my site hoster don't give full trust so i cant even run the mojo setup.

But the last thing i accomplished was that the javascripts read the GPS data from the exif and i updated the google map. For that i used a gallery simular to: http://www.nihilogic.dk/labs/gps_exif_google_maps/ . I copied the script from the page source and that a little bit so it updated the Mojo GoogleMaps div instead of the normal oMap dic in the script. The important thing is that the pictures have to be online in an accessible directory, i don't know why but on my local pc it didn't work seems like google had to access it to or something. The file size of the picture is also important, with large files i takes very long to update the map.

So in short, i used a self created gallery and used the googlemap feature from mojo. With the javascripts from the site mentioned above it is possible to read the exif and update the googlemap feature. If you need my code or something i can try to make it again and post it here (since i don;t use mojo any more i deleted the files, but i think i can reproduce it very quick).

Greets, Chris

11/15/2009 10:50:06 AM
Gravatar
Total Posts 18439

Re: Read Exif data from gallary images to gps point in Google map

Hi Chris,

mojoPortal can run in Medium Trust, it just takes some configuration http://www.mojoportal.com/mediumtrust.aspx

This Exif stuff for GPS is pretty interesting, of course it is only supported in high end cameras or I guess it is becoming very common using phones with cameras and GPS built in.

We already have some server side code for extracting Exif data, though it will need to be modified to extract GPS info as this was only introduced in the last few years I think. It seems this would be better than trying to do it with javascript.

It would be a fun project to implement plotting of images on a google map as an enhancement to the Image Gallery. I've added it to my list but it is a very low priority among other things that need to be done so I would not expect to see this very soon.

Best,

Joe

11/21/2009 7:48:27 AM
Gravatar
Total Posts 5

Re: Read Exif data from gallary images to gps point in Google map

Hey Joe,

Sorry for my late reply. About my ISP, he runs in partial trust, near to medium. The problem is that i run a mySQL DB and my ISP don't support the .Net connector, only the ODBC.

Since i'm not a really good coder, at least not that good that i understand the Mojo project, i can't rewrite the source or modify it. But I will follow the Mojo project and maybe when I understand .Net good enough to modify it for my own needs or when Mojo has all feature i would like i will change to an full trust ISP.

When I i'll use it on my site I will definitly buy you some beers ;)

Greets, Chris

You must sign in to post in the forums. This thread is closed to new posts.