String[] centerLoc = params.get(clientId + "_center").split(",");
String[] northeastLoc = params.get(clientId + "_northeast").split(",");
String[] southwestLoc = params.get(clientId + "_southwest").split(",");
int zoomLevel = Integer.valueOf(params.get(clientId + "_zoom"));
LatLng center = new LatLng(Double.valueOf(centerLoc[0]), Double.valueOf(centerLoc[1]));
LatLng northeast = new LatLng(Double.valueOf(northeastLoc[0]), Double.valueOf(northeastLoc[1]));
LatLng southwest = new LatLng(Double.valueOf(southwestLoc[0]), Double.valueOf(southwestLoc[1]));
wrapperEvent = new StateChangeEvent(this, behaviorEvent.getBehavior(), new LatLngBounds(northeast, southwest), zoomLevel, center);
}
else if(eventName.equals("pointSelect")) {
String[] latlng = params.get(clientId + "_pointLatLng").split(",");
LatLng position = new LatLng(Double.valueOf(latlng[0]), Double.valueOf(latlng[1]));
wrapperEvent = new PointSelectEvent(this, behaviorEvent.getBehavior(), position);
}
else if(eventName.equals("markerDrag")) {
Marker marker = (Marker) this.getModel().findOverlay(params.get(clientId + "_markerId"));
double lat = Double.valueOf(params.get(clientId + "_lat"));
double lng = Double.valueOf(params.get(clientId + "_lng"));
marker.setLatlng(new LatLng(lat, lng));
wrapperEvent = new MarkerDragEvent(this, behaviorEvent.getBehavior(), marker);
}
wrapperEvent.setPhaseId(behaviorEvent.getPhaseId());