Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timob-13628: added zOrderOnTop support #4

Merged
merged 6 commits into from
Oct 28, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file modified android/dist/ti.map-android-2.1.3.zip
Binary file not shown.
1 change: 1 addition & 0 deletions android/documentation/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ v2.1.3 Fixed memory leak when removing map instance from window [TIMOB-14772]
Added longClick event support [TIMOB-13989].
Added support for showInfoWindow property for annotations [TIMOB-12787].
Added a workaround for: https://code.google.com/p/android/issues/detail?id=11676 [TIMOB-15565].
Added support for zOrderOnTop [TIMOB-13628].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to bump the version.


v2.1.2 Clicking on an annotation should center it in map view [TIMOB-13778].
Fixed a bug where removing an annotation using its title crashed the app [TIMOB-14502].
Expand Down
1 change: 1 addition & 0 deletions android/src/ti/map/MapModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class MapModule extends KrollModule
public static final String PROPERTY_RIGHT_PANE = "rightPane";
public static final String PROPERTY_SHOW_INFO_WINDOW = "showInfoWindow";
public static final String PROPERTY_USER_LOCATION_BUTTON = "userLocationButton";
public static final String PROPERTY_ZORDER_ON_TOP = "zOrderOnTop";
public static final String EVENT_PIN_CHANGE_DRAG_STATE = "pinchangedragstate";

@Kroll.constant public static final int NORMAL_TYPE = GoogleMap.MAP_TYPE_NORMAL;
Expand Down
10 changes: 9 additions & 1 deletion android/src/ti/map/TiUIMapView.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.GoogleMapOptions;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.CameraPosition;
import com.google.android.gms.maps.model.LatLng;
Expand Down Expand Up @@ -76,7 +77,14 @@ private void setBackgroundTransparent(View v) {
@Override
protected Fragment createFragment()
{
return SupportMapFragment.newInstance();
if (proxy == null) {
return SupportMapFragment.newInstance();
} else {
boolean zOrderOnTop = TiConvert.toBoolean(proxy.getProperty(MapModule.PROPERTY_ZORDER_ON_TOP), false);
GoogleMapOptions gOptions = new GoogleMapOptions();
gOptions.zOrderOnTop(zOrderOnTop);
return SupportMapFragment.newInstance(gOptions);
}
}

protected void processPreloadRoutes()
Expand Down
9 changes: 9 additions & 0 deletions apidoc/View.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,15 @@ properties:
or <Modules.Map.HYBRID_TYPE>
type: Number
default: NORMAL_TYPE

- name: zOrderOnTop
summary: Controls wether the map view's surface is placed on top of its window.
description: |
Please refer to [zOrderOnTop](https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/GoogleMapOptions#zOrderOnTop(boolean))
for more details.
type: Boolean
default: false
availability: creation

- name: region
summary: |
Expand Down