Skip to content

Instantly share code, notes, and snippets.

View Ozius's full-sized avatar

Arkaitz Osa Ozius

View GitHub Profile
@Ozius
Ozius / GetBitmapDescriptor.java
Last active October 25, 2023 00:46
Get BitmapDescriptor from a VectorDrawable resource for use as an icon on a Google Map Marker. Google Maps SDK for Android.
/*
mMap.addMarker(new MarkerOptions()
.position(new LatLng(latitude, longitude))
.title("Marker Title")
.snippet("Marker snippet")
.icon(getBitmapDescriptor(R.drawable.ic_place_black_48dp)));
*/
private BitmapDescriptor getBitmapDescriptor(int id) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
@Ozius
Ozius / 0_reuse_code.js
Created May 25, 2014 09:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console