Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c70e589c authored by Fynn Godau's avatar Fynn Godau
Browse files

Implement circle tag

parent 861f830f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
package com.google.android.gms.maps.model.internal;

import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.maps.model.LatLng;

interface ICircleDelegate {
@@ -23,4 +24,8 @@ interface ICircleDelegate {
	int hashCodeRemote();
	void setClickable(boolean clickable);
	boolean isClickable();
    void setStrokePattern(IObjectWrapper object);
    IObjectWrapper getStrokePattern();
    void setTag(IObjectWrapper object);
    IObjectWrapper getTag();
}
+19 −0
Original line number Diff line number Diff line
@@ -18,6 +18,9 @@ package org.microg.gms.maps.mapbox.model

import android.os.Parcel
import android.util.Log
import com.google.android.gms.dynamic.IObjectWrapper
import com.google.android.gms.dynamic.ObjectWrapper
import com.google.android.gms.dynamic.unwrap
import com.google.android.gms.maps.model.LatLng
import com.google.android.gms.maps.model.internal.ICircleDelegate
import com.mapbox.geojson.LineString
@@ -48,6 +51,7 @@ class CircleImpl(private val map: GoogleMapImpl, private val id: String, options
    private var fillColor: Int = options.fillColor
    private var visible: Boolean = options.isVisible
    private var clickable: Boolean = options.isClickable
    private var tag: Any? = null

    internal val line: Markup<Line, LineOptions> = object : Markup<Line, LineOptions> {
        override var annotation: Line? = null
@@ -239,6 +243,21 @@ class CircleImpl(private val map: GoogleMapImpl, private val id: String, options
        }
    }

    override fun setStrokePattern(pattern: IObjectWrapper) {
        Log.d(TAG, "unimplemented method: set stroke pattern")
    }

    override fun getStrokePattern(): IObjectWrapper {
        Log.d(TAG, "unimplemented method: getStrokePattern")
        return ObjectWrapper.wrap(null)
    }

    override fun setTag(o: IObjectWrapper) {
        this.tag = o.unwrap()
    }

    override fun getTag(): IObjectWrapper = ObjectWrapper.wrap(tag)

    override fun hashCode(): Int {
        return id.hashCode()
    }