Hi,
I’m trying to utilize a map with 3 WmsOverlay layers, the bottom being rendered by JPEG, and the top being rendered as transparent PNGs.
Since I added the two PNG layers, the app has gotten extremely unstable, often crashing when just trying to show the map initially.
E.g., I tried setting the two PNG layers as SingleTile, but then the bottom MultipleTiled layer refused to render !
Whenever the position providers kick in, they often also crashes the app, even though it’s just a ZoomTo or CenterAt that’s being set. And yes, I have checked the validity of the coordinates, and they’re ok…
Is the some synchronicity issue going astray here ?
If the Android Edition isn’t thread safe, how should I lock the threading in my app ?
My map’s in utm zone 32 meters, and I reproject the lat/long into this before applying it to the map view.
Cheers.
Multiple WmsOverlay = unstable app?
This is a typical crash while debugging:
Thread finished: <Thread Pool> #14
Thread finished: <Thread Pool> #14
06-26 13:36:23.256 D/LifeTrees(18540): btnCollapseMap.Click: 150/592 <<-- my last debug message
Thread started: <Thread Pool> #15
06-26 13:36:23.946 E/mono-rt (18540):
06-26 13:36:23.956 E/mono-rt (18540):
06-26 13:36:23.956 E/mono-rt (18540): Attempting native Android stacktrace:
06-26 13:36:23.956 E/mono-rt (18540):
06-26 13:36:24.016 E/mono-rt (18540): at ???+0 [0xffffffff]
06-26 13:36:24.106 E/mono-rt (18540): =================================================================
06-26 13:36:24.106 E/mono-rt (18540): Got a SIGSEGV while executing native code. This usually indicates
06-26 13:36:24.106 E/mono-rt (18540): a fatal error in the mono runtime or one of the native libraries
06-26 13:36:24.106 E/mono-rt (18540): used by your application.
06-26 13:36:24.106 E/mono-rt (18540): =================================================================
06-26 13:36:24.106 E/mono-rt (18540):
06-26 13:36:24.106 F/libc (18540): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x9930c00c in tid 18766 (Thread-408089)
06-26 13:36:24.106 W/libc (18540): Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
Here’s the button code:
btnCollapseMap.Click +=
delegate
{
Button btn = btnCollapseMap;
RelativeLayout mapContainer = FindViewById<RelativeLayout>(Resource.Id.addregMapContainer);
int
dpHeight = btn.Height;
mapContainer.LayoutParameters.Height = dpHeight;
btn.Visibility = ViewStates.Gone;
// hide me, showing next button
};
Here the axml definition:
<
RelativeLayout
a:layout_width
=
“match_parent”
a:layout_height
=
“500dp”
a:minWidth
=
“25dp”
a:minHeight
=
“25dp”
a:background
=
"@android:color/background_light"
a:id
=
"@+id/addregMapContainer"
>
<
ThinkGeo.MapSuite.AndroidEdition.MapView
a:layout_width
=
“fill_parent”
a:layout_height
=
“fill_parent”
a:id
=
"@+id/addregMap"
a:minHeight
=
“25dp”
a:layout_marginBottom
=
“0.0dp”
/>
<
Button
a:id
=
"@+id/largeMapButton"
a:layout_alignParentRight
=
“true”
a:layout_width
=
“100dp”
a:layout_height
=
“50dp”
a:text
=
“Stort kort”
a:visibility
=
“gone”
/>
<
Button
a:id
=
"@+id/deflateMapButton"
a:layout_alignParentRight
=
“true”
a:layout_width
=
“100dp”
a:layout_height
=
“50dp”
a:text
=
“Vis begge”
a:visibility
=
“visible”
/>
<
Button
a:id
=
"@+id/fullMapButton"
a:layout_alignParentRight
=
“true”
a:layout_width
=
“100dp”
a:layout_height
=
“50dp”
a:text
=
“Vis kort”
a:visibility
=
“visible”
/>
<
Button
a:id
=
"@+id/collapseMapButton"
a:layout_alignParentRight
=
“true”
a:layout_width
=
“100dp”
a:layout_height
=
“50dp”
a:text
=
“Skjul kort”
a:visibility
=
“visible”
/>
</
RelativeLayout
>
Cheers.
Hi Lars,
Your topic didn’t provide the code correctly.
I cannot found the Wms code they are using.
It will be great to see the Wms code so that we could make some changes on it.
There are two possibilities to cause this issue.
We have a Wms sample at: wiki.thinkgeo.com/wiki/Map_Suite_Android_Edition_How_Do_I_Samples (Overlays and Layers/Use Wms Overlay)
Regards,
Don