forked from ionic-team/capacitor-google-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ionic-team/capacitor-plugins#1970 From https://github.com/LaravelFreelancerNL/capacitor-plugins/tree/main
- Loading branch information
Showing
25 changed files
with
597 additions
and
353 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,8 @@ | |
"node": ">=20", | ||
"pnpm": ">=8" | ||
}, | ||
"dependencies": {}, | ||
"workspaces": [ | ||
"plugin" | ||
] | ||
], | ||
"packageManager": "[email protected]+sha1.4fb96925d434c491285182acf29803bb9aa2e6e5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...ndroid/src/main/java/com/capacitorjs/plugins/googlemaps/CapacitorGoogleMapsTileOverlay.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.capacitorjs.plugins.googlemaps | ||
|
||
import com.google.android.gms.maps.model.GroundOverlay | ||
import com.google.android.gms.maps.model.LatLng | ||
import com.google.android.gms.maps.model.LatLngBounds | ||
import org.json.JSONObject | ||
|
||
class CapacitorGoogleMapsTileOverlay(fromJSONObject: JSONObject) { | ||
var imageBounds: LatLngBounds | ||
var imageSrc: String? = null | ||
var opacity: Float = 1.0f | ||
var zIndex: Float = 0.0f | ||
var visible: Boolean = true | ||
var googleMapsTileOverlay: GroundOverlay? = null | ||
|
||
init { | ||
val latLngObj = fromJSONObject.getJSONObject("imageBounds") | ||
val north = latLngObj.optDouble("north", 0.0) | ||
val south = latLngObj.optDouble("south", 0.0) | ||
val east = latLngObj.optDouble("east", 0.0) | ||
val west = latLngObj.optDouble("west", 0.0) | ||
|
||
imageBounds = LatLngBounds(LatLng(south, west), LatLng(north, east)) | ||
imageSrc = fromJSONObject.optString("imageSrc", null) | ||
zIndex = fromJSONObject.optLong("zIndex", 0).toFloat() | ||
visible = fromJSONObject.optBoolean("visible", true) | ||
opacity = 1.0f - fromJSONObject.optDouble("opacity", 1.0).toFloat() | ||
} | ||
} |
Oops, something went wrong.