thanks manuele, i've tried that but the result is same (no error occured 
but the result is not expected, google maps show almost take the sqlform 
grid view entirely).
e.g.
def check_point_admin(row):
scr0 = SCRIPT("""
function initMap() {
var mapDiv = document.getElementById(%s);
document.getElementById(%s).setAttribute("style","width:10px");
document.getElementById(%s).setAttribute("style","height:10px");
document.getElementById(%s).style.width='10px';
document.getElementById(%s).style.height='10px';

var latlon = new google.maps.LatLng( %s, %s );

var mapOptions = {
        center: latlon,
        zoom: 15
        };

        var map = new google.maps.Map(mapDiv, mapOptions);

        var marker = new google.maps.Marker({
   position: latlon, 
   map: map
  });
}
            """ % (row.id, row.id, row.id, row.id, row.id, row.lat, row.lon)
    )

scr1 = SCRIPT(
_src="https://maps.googleapis.com/maps/api/js?callback=initMap";
    )

#return DIV(_id = row.id, _style="width: 1%; height: 1%"), scr0, scr1
#return DIV(DIV(_id = row.id, _style="width: 1%; height: 1%"), scr0, scr1)
return SPAN(DIV(_id = row.id, _style="width: 1%; height: 1%"), scr0, scr1)

def report_check_point():
table = db.check_point
links = [dict(header = T('Image'), 
  body = lambda row: check_point_admin(row)
 )
]
grid = SQLFORM.smartgrid(table, links = links)
return locals()

tried both suggestions (you and massimo) got the same result, i even set 
the style width & height on the SCRIPT(), but got the same result

thanks and best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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/d/optout.

Reply via email to