[Solved] Phoca Map how to print driving directions

Phoca Maps - displaying maps in Joomla! CMS
Pyor
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Dec 2009, 10:00

[Solved] Phoca Map how to print driving directions

Post by Pyor »

Hi,

I am currently developing a site in joomla with one of the "principal stress" display for twenty institutions:
- Access map for each
- But also the access route for each geographical site

my question is this: someone has managed to print directions using the plugin Phoca Maps in an article.
I do tests that were all negative!

Thank you

bye

Excuse me for my English very bad
Last edited by Pyor on 15 Dec 2009, 08:21, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Map how to print driving directions

Post by Jan »

Hi, what you mean with:
someone has managed to print directions using the plugin Phoca Maps in an article
Do you mean displaying directions or printing them (where)?

https://www.phoca.cz/demo/phoca-maps-demo-plugin

Jan
If you find Phoca extensions useful, please support the project
Pyor
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Dec 2009, 10:00

Re: Phoca Map how to print driving directions

Post by Pyor »

Hi,

I want to print the map and the directions to the printer on a sheet of paper

if you have an idea

thx
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [Solved] Phoca Map how to print driving directions

Post by Jan »

Hi, for now there is no such option, so this needs to be customized :-( (adding a link to display the outcome in popup e.g. ).

Added into a feature request list.

Jan
If you find Phoca extensions useful, please support the project
breinicke
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 26 Nov 2008, 22:17

Re: [Solved] Phoca Map how to print driving directions

Post by breinicke »

I second the need for the ability to print the directions. I tried clicking the standard "print" button that I have active in the article document, but it resets the directions widget in the popup window.
emagus
Phoca Member
Phoca Member
Posts: 15
Joined: 30 Sep 2008, 23:27
Location: Germany
Contact:

Re: [Solved] Phoca Map how to print driving directions

Post by emagus »

Hi everybody.
I absolutely second that too! Need this desperately; any idea how to implement a quick and dirty solution?
Thanx
Simon
emagus - web. design. communication.
www.emagus.eu
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [Solved] Phoca Map how to print driving directions

Post by Jan »

Hi, this seems like a big problem, I have search through the internet but found no solution yet.

In fact you get the route by javascript - from the server - so you cannot e.g. click on icon which will load new page as on the page you will not get the javascript from the previous site.

I tried to find some solutions but didn't find anything. If you know some site which allows printing the route, please let me know it.
Yes, you can print the whole site e.g. by Google Maps Site, but there the whole map is loaded. I don't know if the map can be printed (there are some limitation).

If there will be no solution for this, my idea is try following - add a print link (this should be displayed after route will be displayed) this link will be displayed after clicking on get route button and the parameters to this link will be added by javascript - then with GET method it will be sent to popup window - (new view in component needs to be created) and in this window the javascript function needs to be automatically called (not so easy as e.g. you cannot access body tag) and the route should be displayed and with the print button is can be printed - But this is not good solution, so maybe if someone knows better one, please let me know.

Jan
If you find Phoca extensions useful, please support the project
emagus
Phoca Member
Phoca Member
Posts: 15
Joined: 30 Sep 2008, 23:27
Location: Germany
Contact:

Re: [Solved] Phoca Map how to print driving directions

Post by emagus »

Hi Jan.
I have an idea. If you type the following url into your browser:
http://maps.google.de/maps?saddr=Prague ... =UTF8&pw=2
you get a perfectly nice print version of the route.
So basically all we'd need is to extract the FROM-address and the TO-address out of the post and then just add the link as presented above with target="_blank" above the route-output of the site.
like: http://maps.google.de/maps?saddr=$fromA ... =UTF8&pw=2
the only thing left to do, is to make sure the two variables don't contain any odd characters like ü,ö,ä,ß. They can contain Street and all that though. Something like $toADDRESS= "Teststreet%2012,%20Testcity%2012345" is perfectly fine.
Also, it would make sense to set the hl-Parameter in the url to the language of the site.
greetings Simon
emagus - web. design. communication.
www.emagus.eu
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [Solved] Phoca Map how to print driving directions

Post by Jan »

Hi, seems this can work Ok. Is this legal? (will be no problems there with some Google license - I think no)

But I see one problem - then you will not have a "print icon" like in articles in Joomla!

The idea is to have the same behaviour like in joomla (clicking on print icon will open popup window with printable version where you can see the next printicon which directly prints - sends data to printner)

I will do some more tests and will try to find the best solution.

I will take a look at the diacritics characters as when I add "München" to the Get Route there is no problem so there must be some way to convert it (maybe using standard url encoding will be OK)

The problem with language is, if you will use some multilanguage site, then you will have fixed only one translation. So maybe it is better to not send the language as Google will asign the language from browser settings.

So I will do more test there...

Jan
If you find Phoca extensions useful, please support the project
emagus
Phoca Member
Phoca Member
Posts: 15
Joined: 30 Sep 2008, 23:27
Location: Germany
Contact:

Re: [Solved] Phoca Map how to print driving directions

Post by emagus »

good point with the language.
i'm not a lawyer, but I don't think there are restrictions keeping you from doing this link thing.
you're right, it may not be the same "joomly way" as with articles, but in my opinion, it's even more suitable for this problem, because it gives you options like the detail-maps and all that.
anyways, thanks for being so fast responding. Bottom Line: Phoca is No.1 in the Joomla World!
emagus - web. design. communication.
www.emagus.eu
Post Reply