Skip to content

Commit 9582d0d

Browse files
committed
changes
1 parent 8c0da1c commit 9582d0d

6 files changed

Lines changed: 29 additions & 15 deletions

File tree

platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/maps/MapView.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,17 @@ protected CompassView initialiseCompassView() {
212212
protected ImageView initialiseAttributionView() {
213213
ImageView attrView = new ImageView(this.getContext());
214214
addView(attrView);
215-
attrView.setTag("attrView");
216-
attrView.getLayoutParams().width = LayoutParams.WRAP_CONTENT;
217-
attrView.getLayoutParams().height = LayoutParams.WRAP_CONTENT;
218-
attrView.setAdjustViewBounds(true);
219-
attrView.setClickable(true);
220-
attrView.setFocusable(true);
221-
attrView.setContentDescription(getResources().getString(R.string.maplibre_attributionsIconContentDescription));
222-
attrView.setImageDrawable(BitmapUtils.getDrawableFromRes(getContext(), R.drawable.maplibre_info_bg_selector));
223-
// inject widgets with MapLibreMap
224-
attrView.setOnClickListener(attributionClickListener = new AttributionClickListener(getContext(), maplibreMap));
215+
// attrView.setTag("attrView");
216+
// attrView.getLayoutParams().width = LayoutParams.WRAP_CONTENT;
217+
// attrView.getLayoutParams().height = LayoutParams.WRAP_CONTENT;
218+
// attrView.setAdjustViewBounds(true);
219+
// attrView.setClickable(true);
220+
// attrView.setFocusable(true);
221+
// attrView.setContentDescription(getResources().getString(R.string.maplibre_attributionsIconContentDescription));
222+
// attrView.setImageDrawable(BitmapUtils.getDrawableFromRes(getContext(), R.drawable.maplibre_info_bg_selector));
223+
// // inject widgets with MapLibreMap
224+
// attrView.setOnClickListener(attributionClickListener = new AttributionClickListener(getContext(), maplibreMap));
225+
//
225226
return attrView;
226227
}
227228

595 Bytes
Loading

platform/android/MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/location/BasicLocationPulsingCircleActivity.kt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.maplibre.android.testapp.activity.location
22

33
import android.annotation.SuppressLint
4+
import android.graphics.Color
45
import android.location.Location
56
import android.os.Bundle
67
import android.view.Menu
@@ -38,7 +39,8 @@ class BasicLocationPulsingCircleActivity : AppCompatActivity(), OnMapReadyCallba
3839
setContentView(R.layout.activity_location_layer_basic_pulsing_circle)
3940
mapView = findViewById(R.id.mapView)
4041
if (savedInstanceState != null) {
41-
lastLocation = savedInstanceState.getParcelable(SAVED_STATE_LOCATION, Location::class.java)
42+
lastLocation =
43+
savedInstanceState.getParcelable(SAVED_STATE_LOCATION, Location::class.java)
4244
}
4345
mapView.onCreate(savedInstanceState)
4446
checkPermissions()
@@ -49,11 +51,17 @@ class BasicLocationPulsingCircleActivity : AppCompatActivity(), OnMapReadyCallba
4951
@SuppressLint("MissingPermission")
5052
override fun onMapReady(maplibreMap: MapLibreMap) {
5153
this.maplibreMap = maplibreMap
52-
maplibreMap.setStyle(TestStyles.getPredefinedStyleWithFallback("Streets")) { style: Style ->
54+
55+
maplibreMap.setStyle(
56+
Style.Builder()
57+
.fromUri("https://gateway.mapmetrics-atlas.net/styles/?fileName=dd508822-9502-4ab5-bfe2-5e6ed5809c2d/portal.json&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJkZDUwODgyMi05NTAyLTRhYjUtYmZlMi01ZTZlZDU4MDljMmQiLCJzY29wZSI6WyJtYXBzIl0sImlhdCI6MTc1MzQ0MjMzOH0.TogFJJb58kA7QP2664xA3g5tIEZGcX8mNHVkRBlHLBM")
58+
) { style: Style ->
5359
locationComponent = maplibreMap.locationComponent
5460
val locationComponentOptions =
5561
LocationComponentOptions.builder(this@BasicLocationPulsingCircleActivity)
5662
.pulseEnabled(true)
63+
.pulseColor(Color.RED) // Set color of pulse
64+
.foregroundTintColor(Color.BLACK) // Set color of user location
5765
.build()
5866
val locationComponentActivationOptions =
5967
buildLocationComponentActivationOptions(style, locationComponentOptions)
@@ -100,14 +108,17 @@ class BasicLocationPulsingCircleActivity : AppCompatActivity(), OnMapReadyCallba
100108
loadNewStyle()
101109
return true
102110
}
111+
103112
R.id.action_component_disable -> {
104113
locationComponent!!.isLocationComponentEnabled = false
105114
return true
106115
}
116+
107117
R.id.action_component_enabled -> {
108118
locationComponent!!.isLocationComponentEnabled = true
109119
return true
110120
}
121+
111122
R.id.action_stop_pulsing -> {
112123
locationComponent!!.applyStyle(
113124
LocationComponentOptions.builder(
@@ -118,6 +129,7 @@ class BasicLocationPulsingCircleActivity : AppCompatActivity(), OnMapReadyCallba
118129
)
119130
return true
120131
}
132+
121133
R.id.action_start_pulsing -> {
122134
locationComponent!!.applyStyle(
123135
LocationComponentOptions.builder(
@@ -128,6 +140,7 @@ class BasicLocationPulsingCircleActivity : AppCompatActivity(), OnMapReadyCallba
128140
)
129141
return true
130142
}
143+
131144
else -> return super.onOptionsItemSelected(item)
132145
}
133146
}

platform/android/MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/maplayout/SimpleMapActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SimpleMapActivity : AppCompatActivity() {
3030
val key = ApiKeyUtils.getApiKey(applicationContext)
3131
if (key == null || key == "YOUR_API_KEY_GOES_HERE") {
3232
it.setStyle(
33-
Style.Builder().fromUri("https://demotiles.maplibre.org/style.json")
33+
Style.Builder().fromUri("https://gateway.mapmetrics-atlas.net/styles/?fileName=dd508822-9502-4ab5-bfe2-5e6ed5809c2d/portal.json&token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJkZDUwODgyMi05NTAyLTRhYjUtYmZlMi01ZTZlZDU4MDljMmQiLCJzY29wZSI6WyJtYXBzIl0sImlhdCI6MTc1MzQ0MjMzOH0.TogFJJb58kA7QP2664xA3g5tIEZGcX8mNHVkRBlHLBM")
3434
)
3535
} else {
3636
val styles = Style.getPredefinedStyles()

render-test/android/build/reports/problems/problems-report.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@
650650
<script type="text/javascript">
651651
function configurationCacheProblems() { return (
652652
// begin-report-data
653-
{"diagnostics":[{"locations":[{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"Starting with Gradle 9.0, this property will be ignored by Gradle."}],"contextualLabel":"Declaring an 'is-' property with a Boolean type has been deprecated.","documentationLink":"https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_boolean_properties","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"declaring-an-is-property-with-a-boolean-type","displayName":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"solutions":[[{"text":"Add a method named 'getCrunchPngs' with the same behavior and mark the old one with @Deprecated, or change the type of 'com.android.build.gradle.internal.dsl.BuildType$AgpDecorated.isCrunchPngs' (and the setter) to 'boolean'."}],[{"text":"The combination of method name and return type is not consistent with Java Bean property rules and will become unsupported in future versions of Groovy."}]]},{"locations":[{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"Starting with Gradle 9.0, this property will be ignored by Gradle."}],"contextualLabel":"Declaring an 'is-' property with a Boolean type has been deprecated.","documentationLink":"https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_boolean_properties","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"declaring-an-is-property-with-a-boolean-type","displayName":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"solutions":[[{"text":"Add a method named 'getUseProguard' with the same behavior and mark the old one with @Deprecated, or change the type of 'com.android.build.gradle.internal.dsl.BuildType.isUseProguard' (and the setter) to 'boolean'."}],[{"text":"The combination of method name and return type is not consistent with Java Bean property rules and will become unsupported in future versions of Groovy."}]]},{"locations":[{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"Starting with Gradle 9.0, this property will be ignored by Gradle."}],"contextualLabel":"Declaring an 'is-' property with a Boolean type has been deprecated.","documentationLink":"https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_boolean_properties","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"declaring-an-is-property-with-a-boolean-type","displayName":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"solutions":[[{"text":"Add a method named 'getWearAppUnbundled' with the same behavior and mark the old one with @Deprecated, or change the type of 'com.android.build.api.variant.impl.ApplicationVariantImpl.isWearAppUnbundled' (and the setter) to 'boolean'."}],[{"text":"The combination of method name and return type is not consistent with Java Bean property rules and will become unsupported in future versions of Groovy."}]]},{"locations":[{"pluginId":"com.android.internal.application"}],"problem":[{"text":"The Project.exec(Action) method has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"This is scheduled to be removed in Gradle 9.0."}],"contextualLabel":"The Project.exec(Action) method has been deprecated.","documentationLink":"https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#deprecated_project_exec","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"the-project-exec-action-method-has-been-deprecated","displayName":"The Project.exec(Action) method has been deprecated."}],"solutions":[[{"text":"Use ExecOperations.exec(Action) or ProviderFactory.exec(Action) instead."}]]}],"problemsReport":{"totalProblemCount":4,"buildName":"androidRenderTest","requestedTasks":"","documentationLink":"https://docs.gradle.org/8.13/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
653+
{"diagnostics":[{"locations":[{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"Starting with Gradle 9.0, this property will be ignored by Gradle."}],"contextualLabel":"Declaring an 'is-' property with a Boolean type has been deprecated.","documentationLink":"https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_boolean_properties","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"declaring-an-is-property-with-a-boolean-type","displayName":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"solutions":[[{"text":"Add a method named 'getCrunchPngs' with the same behavior and mark the old one with @Deprecated, or change the type of 'com.android.build.gradle.internal.dsl.BuildType$AgpDecorated.isCrunchPngs' (and the setter) to 'boolean'."}],[{"text":"The combination of method name and return type is not consistent with Java Bean property rules and will become unsupported in future versions of Groovy."}]]},{"locations":[{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"Starting with Gradle 9.0, this property will be ignored by Gradle."}],"contextualLabel":"Declaring an 'is-' property with a Boolean type has been deprecated.","documentationLink":"https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_boolean_properties","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"declaring-an-is-property-with-a-boolean-type","displayName":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"solutions":[[{"text":"Add a method named 'getUseProguard' with the same behavior and mark the old one with @Deprecated, or change the type of 'com.android.build.gradle.internal.dsl.BuildType.isUseProguard' (and the setter) to 'boolean'."}],[{"text":"The combination of method name and return type is not consistent with Java Bean property rules and will become unsupported in future versions of Groovy."}]]},{"locations":[{"pluginId":"com.android.internal.application"}],"problem":[{"text":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"severity":"WARNING","problemDetails":[{"text":"Starting with Gradle 9.0, this property will be ignored by Gradle."}],"contextualLabel":"Declaring an 'is-' property with a Boolean type has been deprecated.","documentationLink":"https://docs.gradle.org/8.13/userguide/upgrading_version_8.html#groovy_boolean_properties","problemId":[{"name":"deprecation","displayName":"Deprecation"},{"name":"declaring-an-is-property-with-a-boolean-type","displayName":"Declaring an 'is-' property with a Boolean type has been deprecated."}],"solutions":[[{"text":"Add a method named 'getWearAppUnbundled' with the same behavior and mark the old one with @Deprecated, or change the type of 'com.android.build.api.variant.impl.ApplicationVariantImpl.isWearAppUnbundled' (and the setter) to 'boolean'."}],[{"text":"The combination of method name and return type is not consistent with Java Bean property rules and will become unsupported in future versions of Groovy."}]]}],"problemsReport":{"totalProblemCount":3,"buildName":"androidRenderTest","requestedTasks":":app:assembleOpenglDebug","documentationLink":"https://docs.gradle.org/8.13/userguide/reporting_problems.html","documentationLinkCaption":"Problem report","summaries":[]}}
654654
// end-report-data
655655
);}
656656
</script>

0 commit comments

Comments
 (0)