Thats a valid point, i'll fix it over the weekend. Till then you could
either use a dummy implementation of HasMap interface which would
return null for getJso() or fix it in you local code. First option
would definitely be forward compatible with my fixes.
Thanks for finding the bug!
Cheers!
--
Vinay
-----------------
package <your package name>;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.maps.client.HasMap;
import com.google.gwt.maps.client.HasMapOptions;
import com.google.gwt.maps.client.base.HasLatLng;
import com.google.gwt.maps.client.base.HasLatLngBounds;
import com.google.gwt.maps.client.overlay.HasProjection;
import com.google.gwt.user.client.Element;
public class NullMap implements HasMap {
@Override
public void fitBounds(HasLatLngBounds bounds) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public HasLatLngBounds getBounds() {
throw new IllegalStateException("Illegal invocation");
}
@Override
public HasLatLng getCenter() {
throw new IllegalStateException("Illegal invocation");
}
@Override
public Element getDiv() {
throw new IllegalStateException("Illegal invocation");
}
@Override
public String getMapTypeId() {
throw new IllegalStateException("Illegal invocation");
}
@Override
public int getZoom() {
throw new IllegalStateException("Illegal invocation");
}
@Override
public void panBy(int x, int y) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public void panTo(HasLatLng latLng) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public void panToBounds(HasLatLngBounds bounds) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public void setCenter(HasLatLng latLng) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public void setMapTypeId(String mapTypeId) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public void setOptions(HasMapOptions options) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public void setZoom(int zoom) {
throw new IllegalStateException("Illegal invocation");
}
@Override
public JavaScriptObject getJso() {
return null;
}
@Override
public HasProjection getProjection() {
throw new IllegalStateException("Illegal invocation");
}
}
-----------------------