[web2py] Re: upgrading eCardsOnMap to API V3

2013-06-28 Thread webpypy
As far as i remember, it worked fine.

That was one year ago.



 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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: upgrading eCardsOnMap to API V3

2013-06-27 Thread Kyle Pennell
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: upgrading eCardsOnMap to API V3

2012-06-09 Thread Ashraf Mansour

Thanks 



On Saturday, June 9, 2012 2:23:12 AM UTC+3, puercoespin wrote:

 Maybe:


 (function () {
window.onload=function(){

 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 infowindow;
 
 {{for k,board in enumerate(boards) :}}
   {{if (board.latitude) and (board.longitude) :}}
 point[{{=k}}] = new 
 google.maps.LatLng({{=board.latitude}},{{=board.longitude}});
 var marker = new google.maps.Marker({
   position:point[{{=k}}],
   map:map,
   title:{{=board.name}}
   });

(function({{=k}}, marker) {

 google.maps.event.addListener(marker,'click',function(){
 
if ( !infowindow) {

infowindow =new google.maps.InfoWindow();

}

  infowindow.setContent('div {{=board.name}} 
  {{=board.description}} /div');
   
  infowindow.open(map,marker);

 } );

  })({{=k}}, marker);  

   }

 {{pass}}

 {{pass}}

} ; 
 })();

.