Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-18-2008, 07:28 AM
rha rha is offline
Junior Member
 
Posts: 5
Default fitting yahoo maps Zimlet

Dear Zimbra friends,
using OSS edition 5.0 I'am tried to fit the yahoo Zimlet for Germany, but dont succeed.

The origin code is
"http://maps.yahoo.com/maps_result"
with param "addr" and "csz" and dont work in Germany

The Germany site is
"http://de.routenplaner.yahoo.com/"
and the request of the param addr also dont work.

The result of the request "berlin" should be like this
"http://de.routenplaner.yahoo.com/#mvt=m&q1=Berlin&trf=0&lon=13.377056&lat=52.516012 &mag=6"

Now, please answer how i must modify the maps zimlet ...
Thanks a lot !
__________________
Greetings, rha
Reply With Quote
  #2 (permalink)  
Old 03-18-2008, 08:52 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

To get Berlin you like you want you just have to use the url :
"http://de.routenplaner.yahoo.com/broadband?q1=berlin"
By default the street and the US ZIP CODE are send as parameters.
You can change the US ZIP CODE by an other parameter or add other parameters.
Reply With Quote
  #3 (permalink)  
Old 03-19-2008, 03:25 AM
rha rha is offline
Junior Member
 
Posts: 5
Default

Hi tdesorbaix,
thanks for your answer, but replacing the site location in the zimlet dont work.

How can i replace the code in the zimlet to get this result in the zimlet window?
"http://de.routenplaner.yahoo.com/broadband?q1=berlin"

If i replace the code with "http://de.routenplaner.yahoo.com" the result of moving a address in the webinterface from the addressbook to the zimlet is that zimbra opens a new browser window with the URL
"http://de.routenplaner.yahoo.com/?addr="
followed by the Street-Name from the Address. This URL fails.

Any hints ?
__________________
Greetings, rha
Reply With Quote
  #4 (permalink)  
Old 03-19-2008, 06:12 AM
rha rha is offline
Junior Member
 
Posts: 5
Default

Thanks,

but if a set the URL in the Zimlet to "de.routenplaner.yahoo.com" the zimlet dont work because the param is translated to ...yahoo.com/?addr=... and this dont work.

How should i set the URL in the Zimlet Code that the Zimlet translate this to
"http://de.routenplaner.yahoo.com/#mvt=m&q1=Potsdamer+Allee+100&trf=0&lon=13.199215& lat=52.386942&mag=3" ?

In this example I'm search for "Potsdamer Allee 100".

Tanks a lot.
__________________
Greetings, rha
Reply With Quote
  #5 (permalink)  
Old 03-19-2008, 10:24 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

Here is a modified version of the com_zimbra_ymaps.xml that you can try.
It will work for all the functionalities , except for clicking on the zimlet icon and enter an address :
this is handle in the ymaps.js file.

Quote:
<zimlet name="com_zimbra_ymaps" version="1.0" description="Yahoo Maps">
<include>ymaps.js</include>
<includeCSS>ymaps.css</includeCSS>
<resource>blank_pixel.gif</resource>
<resource>ymaps.gif</resource>
<handlerObject>Com_Zimbra_YMaps</handlerObject>

<contentObject type="address">
<matchOn>
<regex attrs="igm">\b\d+[A-Za-z]?[ ]+([ewns]\.?[ ]+)?[A-Za-z0-9]+([ ]+[A-Za-z0-9]+)*[\s,\.](\s*(\#|[A-Za-z]+[,\.]?)[ ]*\d+[\s,\.])?\s
*[A-Za-z]+([ ]+[A-Za-z]+)*[ ,][ ]*[A-Za-z]{2}([A-Za-z]+([ ][A-Za-z]+)?)?[ ]+\d{5}(-\d{4})?\b</regex>
</matchOn>
<onClick>
<canvas type="window" />
<actionUrl target="http://de.routenplaner.yahoo.com/broadband">
<param name="q1">${src.objectContent}</param>
</actionUrl>
</onClick>
</contentObject>

<zimletPanelItem label="Maps" icon="YMAPS-panelIcon">
<toolTipText>Drag'n'drop a contact to display a Yahoo Map</toolTipText>
<dragSource type="ZmContact">
<canvas type="window"/>
<actionUrl target="http://de.routenplaner.yahoo.com/broadband">
<param name="q1">${obj.workStreet}</param>
<param name="csz">${obj.workPostalCode}</param>
</actionUrl>
</dragSource>
<contextMenu>
<menuItem label="Visit Yahoo Maps" id="MAPS.YAHOO.COM" icon="YMAPS-panelIcon">
<canvas type="window"/>
<actionUrl target="http://de.routenplaner.yahoo.com/">
<param name="referrer">www.zimbra.com</param>
</actionUrl>
</menuItem>
</contextMenu>
</zimletPanelItem>
</zimlet>
Reply With Quote
  #6 (permalink)  
Old 03-20-2008, 01:41 AM
rha rha is offline
Junior Member
 
Posts: 5
Default

Thanks a lot, i will try this.
__________________
Greetings, rha
Reply With Quote
  #7 (permalink)  
Old 03-20-2008, 05:42 AM
rha rha is offline
Junior Member
 
Posts: 5
Default

It works very well, now I'am think I understand this a little bit better.

<actionUrl target="http://de.routenplaner.yahoo.com/broadband">
<param name="q1">${obj.workStreet}</param>
<param name="csz">${obj.workPostalCode}</param>

Finally the last question:
Is there a descrition for the params and the objects anywhere?
To make this perfect I need the param name and the Objekt-Description for the municipality.
__________________
Greetings, rha
Reply With Quote
  #8 (permalink)  
Old 03-21-2008, 09:51 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

In the version i gave it only take the workstreet.
I haven't tested it but you can try to put all the obj parameter in q1, like this :
Quote:
<param name="q1">${obj.workStreet},${obj.workPostalCode}, ${obj.workCity}</param>
it is ${obj.workCity} to get the city parameters.
One more thing : the version I gave open a new window but you can make the zimlet open in dialog window as before by changing those lines :
Quote:
<canvas type="window" />
into
Quote:
<canvas type="dialog" />
You can look at this whitepaper for more parameters :ZimletWhitepaper
Reply With Quote
  #9 (permalink)  
Old 06-25-2008, 01:30 PM
Project Contributor
 
Posts: 25
Default http://mapas.yahoo.maplink2.com.br/endereco.aspx

Does someone have any idea how to fit this zimlet in maplink service of brazilian Yahoo ?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.