我正在尝试使用上述URL来获取静态图像,但似乎无法正常工作。我正在尝试提供可绘制的文件夹图像。我有一个名为android的图像,带有24 * 24 PNG(4位颜色)157B。请帮帮我。
*************************不起作用******************** ************** 字符串mapURL =“ https://maps.googleapis.com/maps/api/staticmap?center=” + location.latitude +“,” + location。经度+ “&zoom = 13&size =” + cardWidth +“ x” + (int)(context.getResources()。getDimension(R.dimen.fragment_map_size)/密度)+ “&scale =” + 比例+“&markers = icon:” + context.getResources()。getDrawable(R.drawable.android) + location.latitude +“,” + location。经度 +“&key =” + APIConstants.API_BROWSER_PLACES_KEY;
Also this link is working for the color marker i.e %7C. (Default Marker) I have code below.
*****************************工作代码**************** ********** 字符串mapURL =“ https://maps.googleapis.com/maps/api/staticmap?center=” + location.latitude +“,” + location。经度+ “&zoom = 13&size =” + cardWidth +“ x” + (int)(context.getResources()。getDimension(R.dimen.fragment_map_size)/密度)+ “&scale =” + 比例+“&markers =颜色:” +“蓝色%7C” + + location.latitude +“,” + location。经度 +“&key =” + APIConstants.API_BROWSER_PLACES_KEY;
Thank you.