This is the code of the module i'm trying to deploy, it's a test
module at the moment just showing a map and if u double click it marks
where u click.

package com.mycompany.project.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.maps.client.MapWidget;
import com.google.gwt.maps.client.control.MapTypeControl;
import com.google.gwt.maps.client.control.SmallMapControl;
import com.google.gwt.maps.client.event.MapClickHandler;
import com.google.gwt.maps.client.geom.LatLng;
import com.google.gwt.maps.client.overlay.Marker;
import com.google.gwt.maps.client.overlay.Overlay;
import com.google.gwt.user.client.ui.RootPanel;

public class UsersMap implements EntryPoint {

        public void onModuleLoad() {
                MapWidget mapWiget = new MapWidget(LatLng.newInstance(48.136559,
                                11.576318), 13);
                mapWiget.setSize("500px", "300px");

                mapWiget.addControl(new SmallMapControl());
                mapWiget.addControl(new MapTypeControl());

                mapWiget.addMapClickHandler(new MapClickHandler() {
                        public void onClick(MapClickEvent e) {
                                MapWidget sender = e.getSender();
                                Overlay overlay = e.getOverlay();
                                LatLng point = e.getLatLng();

                                if (overlay != null && overlay instanceof 
Marker) {
                                        sender.removeOverlay(overlay);
                                } else {
                                        sender.addOverlay(new Marker(point));
                                }
                        }
                });

                RootPanel.get().add(mapWiget);
        }
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to