google-maps

Show text on polygon android Google map v2

空扰寡人 提交于 2021-02-06 10:59:24
问题 I am using polygons on map and I want to have a text on them. Is there any possible way to do this? I tried to put simple text on map point but didn't make it. private void addPolygon(Region reg) { PolylineOptions polylineOptions = new PolylineOptions(); ArrayList<LatLng> coordList=reg.getAllPoints(); coordList.add(coordList.get(0)); int regColor = reg.getColor(); String regName = reg.getName(); //want to put a name on region polylineOptions.addAll(coordList); polylineOptions .width(5) .color

Show text on polygon android Google map v2

青春壹個敷衍的年華 提交于 2021-02-06 10:59:13
问题 I am using polygons on map and I want to have a text on them. Is there any possible way to do this? I tried to put simple text on map point but didn't make it. private void addPolygon(Region reg) { PolylineOptions polylineOptions = new PolylineOptions(); ArrayList<LatLng> coordList=reg.getAllPoints(); coordList.add(coordList.get(0)); int regColor = reg.getColor(); String regName = reg.getName(); //want to put a name on region polylineOptions.addAll(coordList); polylineOptions .width(5) .color

What is the encoding of the data attribute in the new Google Maps?

烈酒焚心 提交于 2021-02-06 08:52:25
问题 The new Google Maps have URLs that look like this: https://www.google.com/maps/search/coffee/@37.0625,-95.677068,4z/data=!3m1!4b1 Obviously the search term is "coffee" and @37.0625,-95.677068,4z is the lat, lng and zoom; but what is data? I.e. what encoding is !3m1!4b1 ? 回答1: I've never seen this encoding, I guess it's something proprietary by Google. There are some hints about the structure though. I clicked on "embed" and got a longer url, with the same syntax: <iframe src="https://www

How to add background service in Geofence android

心已入冬 提交于 2021-02-06 08:51:50
问题 I am trying to create a geofence with background service for monitor. The geofence create successfully and work when apps Activity is open but when close the app geofence not work. What should I do now. My code is: public class MapsActivity extends FragmentActivity implements OnMapReadyCallback, GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

How to draw a shape of polygon dynamically on map in Angular

吃可爱长大的小学妹 提交于 2021-02-06 03:39:43
问题 how to draw a shape of polygon dynamically(not predefined paths ) and how to store lat long values of Polygon I already refer AGMPolygon but it didn't solve my isuse 回答1: Update 26 Apr 2018. I am not sure but seems that the Angular Google Maps has already supported drawing polygon. You can check more. Check the working plunker: Basic version (drawing polygon only) https://stackblitz.com/edit/angular-draw-polygon-google-maps Updated version (draw polygon and intersect checking) ( plunker is

Drawing shapes in Android MapView independent of the zoom level

限于喜欢 提交于 2021-02-05 17:44:37
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Drawing shapes in Android MapView independent of the zoom level

心已入冬 提交于 2021-02-05 17:41:22
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Drawing shapes in Android MapView independent of the zoom level

十年热恋 提交于 2021-02-05 17:36:14
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Drawing shapes in Android MapView independent of the zoom level

浪尽此生 提交于 2021-02-05 17:34:09
问题 I need to draw shapes just like those you would create with custom maps on Google Maps, using Android's MapView. In other words, if I draw a shape on the map, when I zoom out it should shrink, covering the same area of the map regardless of the zoom level. Example following the Android Reference: @Override public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) { super.draw(canvas, mapView, shadow); //---translate the GeoPoint to screen pixels--- Point screenPts = new

Android Google Maps API v2 - how to change marker icon

依然范特西╮ 提交于 2021-02-05 14:45:19
问题 I am trying to change marker icon. I get the image from one server directory. When I put break point every time the "bit" result is null . And when I run the app I get java.lang.NullPointerException . File file = new File("J:\\!!! DOCUMENTS\\!Outsourcing\\AppStore\\Benzinostancii\\Petrol\\logo.png"); Bitmap bit = BitmapFactory.decodeFile(String.valueOf(file)); double Dlat = lat.get(index); double Dlon = lon.get(index); String info = Arrayinfo.get(index); String name = Arrayname.get(index);