Jürgen Stolz schrieb:
> Hello together,
> this are m first steps with QooxDoo and one of my goals is to access 
> google maps. I don´t find an entry point how I can display a map (like 
> http://map.ovjih.net/). Could somebody give me a hint or a small code 
> example?
>
>   
Hello Jürgen,

you can use a qx.ui.embed.Html widget to display a google map. Since 
qooxdoo widgets are not rendered immediately you need to wait for the 
"appear" event to load the map into the widget. Your code could look 
something like this (not tested)

google.load("maps", "2.x");

var map = new qx.ui.embed.Html();
map.addListenerOnce("appear", function(e)
{
    var gmap = new 
google.maps.Map2(map.getContentElement().getDomElement());
   gmap.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13);
}, this);

The google example code is from 
<http://code.google.com/apis/maps/documentation/index.html#AJAX_Loader>
I hope this works :-)

Best Fabian



-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG
Brauerstraße 48
76135 Karlsruhe

Amtsgericht Montabaur HRB 6484

Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Oliver Mauss, Achim 
Weiss
Aufsichtsratsvorsitzender: Michael Scheeren


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to