Closed
Description
Hi, I'm struggling to add a ground overlay and I can't find examples in the documentation or other threads. I'm testing on Android.
This is what I have tested so far:
map.addGroundOverlay({
visible: true,
image: await ImageSource.fromUrl("https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg"),
bearing: 0,
zIndex: 10,
// transparency: 0,
bounds: {
northeast: { lat: 40.773941, lng: -74.12544 },
southwest: { lat: 40.712216, lng: -74.22655 }
}
});
If I specify bounds
I get this exception: "java.lang.IllegalArgumentException: Options doesn't specify a position".
map.addGroundOverlay({
visible: true,
image: await ImageSource.fromUrl("https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg"),
bearing: 0,
zIndex: 10,
// transparency: 0,
position: { lat: 40.773941, lng: -74.12544 },
anchorU: 0,
anchorV: 1,
height: 1000,
width: 1000
});
If instead I specify position
, anchorU
, anchorV
, height
and width
, I get: "Error: java.lang.IllegalArgumentException: Location must be specified".
What is the correct way to initialise a ground overlay?
Metadata
Metadata
Assignees
Labels
No labels