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

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

Open
firecatmusic opened this issue Dec 22, 2018 · 0 comments
Open

Comments

@firecatmusic
Copy link

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
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant