Skip to content

Instantly share code, notes, and snippets.

View git-elliot's full-sized avatar
🎯
Focusing

git-elliot

🎯
Focusing
View GitHub Profile
@git-elliot
git-elliot / CustomImageMarker.java
Last active October 16, 2023 23:28
How to create custom image marker with Icon Generator using bitmap image in android
// Put custom image marker on map and download image from URL.
// Add this dependency in build.gradle(app)
// compile 'com.google.maps.android:android-maps-utils:0.4'
public Bitmap getBitmapFromURL(String src) {
try {
java.net.URL url = new java.net.URL(src);
HttpURLConnection connection = (HttpURLConnection) url
.openConnection();
connection.setDoInput(true);