List of usage examples for com.google.gwt.maps.client.overlays Animation STOPANIMATION
Animation STOPANIMATION
To view the source code for com.google.gwt.maps.client.overlays Animation STOPANIMATION.
Click Source Link
From source file:com.google.gwt.maps.testing.client.maps.BasicMapWidget.java
License:Apache License
private void draw() { Button addBounceMarkerButton = new Button("Add Marker with Bounce"); addBounceMarkerButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (markerBouncing != null) { markerBouncing.clear();// ww w. j av a2s . c o m } drawMarkerWithBounceAnimation(); } }); Button addDropMarkerButton = new Button("Add Marker with Drop"); addDropMarkerButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (markerDrop != null) { markerDrop.clear(); } drawMarkerWithDropAnimation(); } }); Button stopAnimationsButton = new Button("Stop Animations"); stopAnimationsButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (markerBasic != null) { markerBasic.setAnimation(Animation.STOPANIMATION); } if (markerBouncing != null) { markerBouncing.setAnimation(Animation.STOPANIMATION); } if (markerDrop != null) { markerDrop.setAnimation(Animation.STOPANIMATION); } } }); Button startAnimationsButton = new Button("Start Animations"); startAnimationsButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (markerBasic != null) { markerBasic.setAnimation(Animation.BOUNCE); } if (markerBouncing != null) { markerBouncing.setAnimation(Animation.BOUNCE); } if (markerDrop != null) { markerDrop.setAnimation(Animation.DROP); } } }); // basic controls to test markers HorizontalPanel hp = new HorizontalPanel(); hp.add(new HTML("<br>Basic Map Example. With an AdUnit")); hp.add(addBounceMarkerButton); hp.add(new HTML(" ")); hp.add(addDropMarkerButton); hp.add(new HTML(" ")); hp.add(startAnimationsButton); hp.add(new HTML(" ")); hp.add(stopAnimationsButton); hp.setCellVerticalAlignment(addBounceMarkerButton, VerticalPanel.ALIGN_BOTTOM); hp.setCellVerticalAlignment(addDropMarkerButton, VerticalPanel.ALIGN_BOTTOM); hp.setCellVerticalAlignment(startAnimationsButton, VerticalPanel.ALIGN_BOTTOM); hp.setCellVerticalAlignment(stopAnimationsButton, VerticalPanel.ALIGN_BOTTOM); pWidget.clear(); pWidget.add(hp); drawMap(); drawMapAds(); drawBasicMarker(); }