Show Static Map Google with Picasso on Android

0

I'm developing an app by Android Studio, I'd like to create a RecyclerView where I had an ImageView and upload a static image of a determining point on the map.

Like here: link

I tried to use this method with Picasso (Library that takes an image of a url and loads an ImageView) but nothing happens, with other urls of images on the internet that I used to test it worked and loaded in ImageView but with that it does not appear nothing:

imageMap = findViewById(R.id.imageMap);

        String lat = "-12.958811";
        String lon = "-38.401606";

        String url ="https://maps.googleapis.com/maps/api/staticmap?";
        url+="&zoom=14";
        url+="&size=330x130";
        url+="&maptype=roadmap";
        url+="&markers=color:green%7Clabel:G%7C"+lat+", "+lon;
        url+="&key=AQUI_VEM_A_MINHA_KEY";

        Picasso.get().load(url).into(imageMap);

Does anyone know how to do this with this or another method?

    
asked by anonymous 19.12.2018 / 22:02

0 answers