[aida] Javascripts

Nicholas Moore nicholas.moore at tsr-i.com
Tue Oct 2 18:11:15 CEST 2007


I show a google map in a cell  like this (with no external file):

    (e newCell)
    addBreak;
        align: #center;
        addText: '
<iframe width="240" height="180" frameborder="0" scrolling="no" 
marginheight="0" marginwidth="0" 
src="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;om=1&amp;s=AARTsJpOU76BOuLx9Iv9OiWPoYlz06tHfQ&amp;msa=0&amp;msid=105741824393007908646.000001127bc850ee303ef&amp;ll=45.864194,1.329346&amp;spn=0.172135,0.32959&amp;z=10&amp;output=embed"></iframe><br 
/><small><a 
href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;om=1&amp;msa=0&amp;msid=105741824393007908646.000001127bc850ee303ef&amp;ll=45.864194,1.329346&amp;spn=0.172135,0.32959&amp;z=10&amp;source=embed" 
style="color:#0000FF;text-align:left">View Larger Map</a></small>'.

Works fine. This is a map I have created through a google account first.

Nicholas

Dirk Verleysen wrote:
>
> New question but I first want to thank Nicholas and Janko for their 
> answers.
>
>  
>
> I want to display a googlemap. I need some javascript in my code.
>
>  
>
> The first line is this one:
>
> <script type="text/javascript" 
> src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=myKeyxxxx"></script>
>
>  
>
> Then there is this javascript code that I need in the html file. I 
> tried putting it in an external file but this didn’t work.
>
>   <script>
> //<![CDATA[
> function load() {
> if (GBrowserIsCompatible()) {
> var map = new GMap2(document.getElementById("map"));
> var geocoder = null;
> var trafficInfo = new GTrafficOverlay();
> map.setCenter(new GLatLng(50.968580,4.073543,0), 15);
> map.addControl(new GSmallMapControl());
> map.addControl(new GMapTypeControl());
> geoCode = new GClientGeocoder();
> var encodedPolyline = new GPolyline.fromEncoded({
>     color: "#09E466",
>     weight: 10,
>     points: "gxavHgvzW{GiItCwElAbD_ at h@lC`Eq at tC",
>     levels: "BBBBBBB",
>     zoomFactor: 32,
>     numLevels: 4
> });
> map.addOverlay(encodedPolyline);
> } }
> function showAddress(address) {
> geocoder.getLatLng(
> address,
> function(point) {
> if (!point) {
> alert(address + " not found");
> } else {
> map.setCenter(point, 13);
> var marker = new GMarker(point);
> map.addOverlay(marker);
> marker.openInfoWindowHtml(address);
> }
> }
> );
> }
> //]]>
> </script>
>  
> The <body> tag also needs the onLoad=”load()” onUnload=”GUnload()”. 
>  
> What’s the best way to deal with this ?
>  
> Dirk
>  
>  
>
>  
>
>  
>
>  
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Aida mailing list
> Aida at aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida
>   


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aidaweb.si/pipermail/aida/attachments/20071002/3405e877/attachment-0001.htm 


More information about the Aida mailing list