Embed google map module into own webpage

ropel

Joined: 2007-04-22
Posts: 28
Posted: Fri, 2007-05-04 20:58

The workaround seemed to do the trick. Unfortunately when changing the config.php lots of other thing change within gallery. For instance saving setting for the module no longer works, because of an invalid path.

Furthermore the workaround introduced a white border around the map, which I don't want for my website. (I guess the gallery css style is included)

Please let me know what the upcoming changes will be concerning the paths. Otherwise I might consider going back one revision to get it to work temporarely.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2007-05-04 21:33
ropel wrote:
The workaround seemed to do the trick. Unfortunately when changing the config.php lots of other thing change within gallery. For instance saving setting for the module no longer works, because of an invalid path.

I'm not sure what's that all about. I have no issues with these exacvt same settings either in embedded simple, in a different folder or even in a multi-instance embedded outside the gallery folder.

ropel wrote:
Furthermore the workaround introduced a white border around the map, which I don't want for my website. (I guess the gallery css style is included)

The "workaround" doesn't change the code, it just fixes it. So if before the change the CSS wasn't there it's because it was pointing to the wrong spot :-)

ropel wrote:
Please let me know what the upcoming changes will be concerning the paths. Otherwise I might consider going back one revision to get it to work temporarely.

We can't change this back to what it was before because it was wrong and it will break multi-instance, which is a larger concern than embedded mode outside of the gallery folder (i.e. not as common of a case)

Back to my original assumption where I need to do more testing but right now, I have it working this way correctly so I'm not sure what the issue is for you yet.

I'll let you know a bit later.
-------------------------
The Termite - :-) - http://www.termitenshort.com/

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2007-05-04 21:34

I do have a question for you though.

Are you using GalleryEmbed or using some readfile solution still ?
-------------------------
The Termite - :-) - http://www.termitenshort.com/

 
ropel

Joined: 2007-04-22
Posts: 28
Posted: Sat, 2007-05-05 15:05

Simple readfile solution. Actually the curl solution as suggested for the image block module.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sat, 2007-05-05 19:22

Ok, then this is why you're having problems .... Gallery isn't meant to be used in readfile (only the random block and that's a special page designed for that purpose).

Either way, I would recommend looking at this: http://codex.gallery2.org/Gallery2:Embedding:Code_Snippets

The wrapper will allow you to include gallery in any PHP page and it's extremely easy.

For more information about embedding gallery: http://codex.gallery2.org/Gallery2:Embedding

Let us know !
-------------------------
The Termite - :-) - http://www.termitenshort.com/

 
ropel

Joined: 2007-04-22
Posts: 28
Posted: Sun, 2007-05-06 12:17

Thanks for this recommendations, but I think I did not describe the problem clear enough.
I'm not looking to embed the entire gallery functionality into my website.
Instead I only want to show the map, which opens the gallery at it's own location.
(http://www.ropel.nl/v2/nl/fotos.php?menu=on1)

Thing is when I change the URI in the config.php file of gallery, than I get problems
saving settings in the administration panel of gallery itself. (so no external thing, or embedding involved).
For instance trying to change any setting in the google maps administration do not get saved any longer.
I guess gallery internally uses this uri path to post the form data, and might end up in the wrong place?!

Regards,

Roy

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Sun, 2007-05-06 17:16

It doesn't matter what you're trying to put in a different page than gallery the embed API is the only way you can achieve this correctly.

readfile / curl doesn't correctly and putting a solution in the map module (or any module for that matter) that makes this work and break other more conventional solution is not gonna happen soon :-)

What we would really need to do for this to work is create a separate Page of the module that is meant to be externally used (much like the External Image Block) but that means that some code would be doubled and we don't have this planned at the moment.

With the current module, what you can do is either use the embed API or the visual integration (which both would reach your goal) or another possibility (which I personally don't really like) would be to use an iFrame with the source of the iframe being the full screen map.

Later !
-------------------------
The Termite - :-) - http://www.termitenshort.com/

 
ropel

Joined: 2007-04-22
Posts: 28
Posted: Mon, 2007-05-07 06:52

Ok, I figured that this might only be usefull when integration requires POST/GET variables. I seem to be mistaken. Somewhere this week I'll give the embedding a look, and see if I can get it to work nicely. Still that does not solve the fact that the administration panel behaves strangely when changing the baseURI in config.php.

Yet another thing I would like to know: is it possible to change the zoom level for fullscreen mode 3 seperately?
I think it looks quite silly to see two world maps concatenated :)

Greetings!

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2007-05-07 14:10
ropel wrote:
Still that does not solve the fact that the administration panel behaves strangely when changing the baseURI in config.php.

Actually it does because you wouldn't have to do that anymore, it will work as designed when using embedded :-)

ropel wrote:
Yet another thing I would like to know: is it possible to change the zoom level for fullscreen mode 3 seperately?
I think it looks quite silly to see two world maps concatenated :)

That's because you're using the map in a tiny mini space ... Maybe you can take a look at AutoCenter & Zoom which will zoom and center so that it can see all your items. If that doesn't work for you, you will have to make a choice between using the map embedded or not embedded and chose the zoom level accordingly.

At this point there is no specific settings for the map. This is something that we will build on for the next versions where we could "create" maps with different settings and such, but right now it's not built that way :-(

See you !
-------------------------
The Termite - :-) - http://www.termitenshort.com/

 
ropel

Joined: 2007-04-22
Posts: 28
Posted: Thu, 2007-05-17 17:04

Hi there,

It's been a while since my last post. I didn't have too much time lately.
Anyway, I've been trying to embed the map, which only succeeded to a certain extend.

I can load the gallery embedded in a file on a seperate page. Somehow however it seems
that some translation is not being made, since the div for the map only contains
the text "Loading please wait".

http://www.ropel.nl/v2/nl/fotos.php?menu=on1&g2_view=map.ShowMap&g2_fullScreen=2

Whereas the same concept seems to work on another page.

http://www.ropel.nl/v2/nl/embedded.php?g2_view=map.ShowMap

What I do now is call "runGallery" at the top of the page and at the place where I would
like to have the map I do:

if (isset($data['bodyHtml'])) {
echo $data['bodyHtml'];
}

Hope anyone has a suggestion what I'm doing wrong here.

Furthermore: AutoZoom is great. Thnx.

Last but not least I decided to do something in return. I've translated (mostly) the module terms into dutch.
I tried to add it to the SVN, but I need a password. So I've decided just to add the files as an attached zip.
Hope you like it.

Regards,

Roy

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Thu, 2007-05-17 22:05

I'm not the embedding expert, maybe Termitenshort can help here.

Thanks for the translation contribution! I'm working on getting it integrated into the Map module now.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Fri, 2007-05-18 06:13

ropel,

you also need to have

echo $data['headHtml'];
echo $data['javascript'];
echo $data['css'];

Somewhere in your "head" so that the proper javascript and CSS gets added to enable the google map. All of teh code is in the "head" and right now does not appear on your source code :-). Adding these three should fix that.

See you !
-------------------------
The Termite - :-) - http://www.termitenshort.com/

 
ropel

Joined: 2007-04-22
Posts: 28
Posted: Fri, 2007-05-18 07:46

Ah, of course. I should have thought of that myself.

Everything is working the way I wanted to have it.
(Except for, the routes..stupid provider!)

I hope that in the future there will be other styles to
choose for the InfoWindow. Preferably smaller ones :)
That would be the finishing touch :)

Thanks again guys!