Skip to content

Any reference to use default google maps marker in this library? #23

Description

@firecatmusic

i was trying to using BitmapDescriptorFactory.defaultMarker and its getting red,
any references?

if (Build.VERSION.SDK_INT >= 23) {
            val geoLocator = GeoLocator(this@BerangkatKerjaActivity, this@BerangkatKerjaActivity)
            val origin = LatLng(geoLocator.lattitude, geoLocator.longitude) //lokasi terapis sekarang
            val destination = LatLng(-7.781200, 110.349709) //lokasi tujuan
            DrawRouteMaps.getInstance(this)
                    .draw(origin, destination, mMap)
            DrawMarker.getInstance(this).draw(mMap, origin, BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE), "Origin Location") //getting red in this line
            DrawMarker.getInstance(this).draw(mMap, destination, BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE), "Destination Location") //getting red in this line
        } else {
            val service = getSystemService(FragmentActivity.LOCATION_SERVICE) as LocationManager
            val criteria = Criteria()
            val provider = service.getBestProvider(criteria, false)
            val location = service.getLastKnownLocation(provider)
            val userLocation = LatLng(location.latitude, location.longitude)
            val origin = LatLng(userLocation.latitude, userLocation.longitude) //lokasi terapis sekarang
            val destination = LatLng(-7.781200, 110.349709) //lokasi tujuan
            DrawRouteMaps.getInstance(this)
                    .draw(origin, destination, mMap)
            DrawMarker.getInstance(this).draw(mMap, origin, BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE), "Origin Location") //getting red in this line
            DrawMarker.getInstance(this).draw(mMap, destination, BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE), "Destination Location") //getting red in this line
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions