Any luck getting this to work?

On Wednesday, March 21, 2012 8:46:23 AM UTC-7, webpypy wrote:
>
> Hi all,
>
> I am trying to upgrade eCardsOnMap to API V3.
>
> I think i have to use the array to get (title , infowindow) for each 
> marker.
>
> my code is :
>
> <script type="text/javascript">
>       function initialize() {
>         var myOptions = {
>           center: new google.maps.LatLng(-34.397, 150.644 ),
>           zoom: 15,
>           mapTypeId: google.maps.MapTypeId.ROADMAP
>         };
>         var map = new 
> google.maps.Map(document.getElementById("map_canvas"),
>             myOptions);
>         
>         var point = [];
>         var marker = [];
>         var contentstring = [];
>         var infowindow = [];
>         
>         {{for k,board in enumerate(boards) :}}
>           {{if (board.latitude) and (board.longitude) :}}
>             point[{{=k}}] = new 
> google.maps.LatLng({{=board.latitude}},{{=board.longitude}});
>             marker[{{=k}}] = new google.maps.Marker({
>               position:point[{{=k}}],
>               map:map,
>               title:{{=board.name}}
>               });
>             contentstring[{{=k}}] = '<div> {{=board.name}} 
>  {{=board.description}} </div>';
>             infowindow[{{=k}}]    = new google.maps.InfoWindow({
>               content:contentstring[{{=k}}]
>             })
>             
> google.maps.event.addListener(marker[{{=k}}],'click',function(){
>               infowindow[{{=k}}].open(map,marker[{{=k}}])
>               })
>             {{pass}}
>         {{pass}}
>
>       }
>     </script>
>
>
> the problem started after using the array.
>
> A quick review of someone experienced to the code will discover the 
> problem.
>
> Any help is appreciated.
>
> Ashraf
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to