Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let's work together #130

Closed
wants to merge 84 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
a2c94e3
working buttons on the map + ios part that started
vorokami Dec 16, 2021
e8a798a
added updateMarker()
vorokami Dec 16, 2021
dd667fb
Trying android solution for touchDelegation to map
vorokami Dec 26, 2021
c88b4f5
Added folder structure and CustomTopViewController
vorokami Dec 27, 2021
434a94c
cracked passing touches to map through html
vorokami Dec 29, 2021
0191faf
finished "touch through html view to map" in iOS
vorokami Dec 29, 2021
8f8b935
Added methods blockMapViews(), unblockMapViews()
vorokami Dec 30, 2021
976e423
deleted junk code and topView classes from iOS
vorokami Dec 30, 2021
b43a010
added getter and setter for array of HTML elements
vorokami Dec 30, 2021
0fc81cb
Added to class BoundingRect func getJSObject()
vorokami Jan 2, 2022
a5abe29
updated getter and setter for ArrayOfHTMLElements
vorokami Jan 2, 2022
7df16af
applied xcode recommended settings
vorokami Jan 3, 2022
4040ff7
added 'Google-Maps-iOS-Utils' library
vorokami Jan 3, 2022
fffa672
added clustering
vorokami Jan 3, 2022
3aaed6b
deleted dot underscore ._files from macOS
vorokami Jan 4, 2022
3b40fe5
added variable google-api-key to android
vorokami Jan 5, 2022
3c5bf23
added purple cluster icon
vorokami Jan 5, 2022
e71937c
added? hide and show methods to android
vorokami Jan 6, 2022
35fcf63
added! hide() and show() for android
vorokami Jan 6, 2022
357d51b
added method addMarkers()
vorokami Jan 6, 2022
36e9755
set z-index marker < z-index cluster
vorokami Jan 6, 2022
86dfbda
added class MarkerCategory
vorokami Jan 7, 2022
472505f
in process of adding marker categories
vorokami Jan 10, 2022
64ae139
made class Events abstract
vorokami Jan 11, 2022
787bca9
added marker categories to asset
vorokami Jan 11, 2022
20f54eb
re-added small version of some icons
vorokami Jan 12, 2022
f84652f
made some refactoring
vorokami Jan 12, 2022
dbc252c
made map of categories final
vorokami Jan 12, 2022
7ff749c
added plugin method addMarkerCategory()
vorokami Jan 12, 2022
7eb359f
added handling the use of an incorrect marker category id
vorokami Jan 12, 2022
6a3a0e7
change location of google maps api key
vorokami Jan 13, 2022
247986b
сhanged how to store API key
vorokami Jan 13, 2022
dabdadb
deleted unnecessary dependency
vorokami Jan 14, 2022
1f4e2a9
added zoomInButtonClick() and zoomOutButtonClick() to plugin
vorokami Jan 14, 2022
59b3838
deleted icons
vorokami Jan 14, 2022
026ed8d
added new icons of marker categories
vorokami Jan 14, 2022
e7017d8
update how to look icons of clusters and markers
vorokami Jan 14, 2022
bf1321e
added adding of categories in alphabet order
vorokami Jan 14, 2022
df65b54
change size of the clusters to 64dp
vorokami Jan 17, 2022
72f7334
now api key in the file AndroidManifest.xml of the plugin
vorokami Jan 17, 2022
da9772f
Added myLocationButton()
vorokami Jan 17, 2022
6c2fa37
unclusetring cluster on single tap
vorokami Jan 18, 2022
6d990fc
Added methods zoomInButtonClick() and zoomOutButtonClick() to ios com…
vorokami Jan 19, 2022
7b3a8c0
Added support for geolocation plugin and couple privacy descriptions …
vorokami Jan 20, 2022
7c330ae
fixed bug when webview was loaded and its background wasn't set trans…
vorokami Jan 20, 2022
2b8a82d
rewrote methods addMarker() , addMarkers(), removeMarker() for suppor…
vorokami Jan 21, 2022
8f910cd
deleted old unused view class
vorokami Jan 21, 2022
6903545
added custom icons to clusters to ios component
vorokami Jan 24, 2022
43894c8
added class for working with animation of markers
vorokami Jan 24, 2022
3ca5834
changed way to access views
vorokami Jan 24, 2022
1dd6cf4
added classes to ios folder
vorokami Jan 24, 2022
f6e6257
added functional for the custom myLocation button to ios component
vorokami Jan 27, 2022
420bc4a
added marker categories to ios
vorokami Jan 28, 2022
ee15cdf
change git repo link in package.json file for google maps plugin
vorokami Jan 28, 2022
6b62cb7
added uncluster on single tap on a cluster
vorokami Jan 28, 2022
49a5368
added methods hide() and show() to ios native component of plugin
vorokami Jan 31, 2022
325b1fb
set cluster's icons over marker's icons
vorokami Jan 31, 2022
9ecd935
added different cluster sizes depending on the number of markers inside
vorokami Jan 31, 2022
5b4ba28
deleted unused imports
vorokami Feb 4, 2022
0c3fd6c
changed params of width and heigh of cluster icon
vorokami Feb 4, 2022
b3f296e
added different cluster sizes on android now too
vorokami Feb 4, 2022
6451653
changed name of package "model" to "maket"
vorokami Feb 4, 2022
7635319
added constant for minimal value of count of elements in cluster
vorokami Feb 4, 2022
e9ff0f3
added method for getting info ambout CustomMarker obj
vorokami Feb 4, 2022
36a76ad
added getting info about items inside cluster
vorokami Feb 4, 2022
090f2a4
added 20% indents when unclustering
vorokami Feb 4, 2022
2084f0f
changed condition for unclustering
vorokami Feb 7, 2022
df745cd
change variable name isGetMarkersData to getMarkersData
vorokami Feb 7, 2022
a1c7695
added different z-index for clusters based on their zoom level
vorokami Feb 7, 2022
797bbd5
added package 'marker'
vorokami Feb 7, 2022
840fa01
delete some broken files in this repo
vorokami Feb 7, 2022
48e983e
added indents when unclustering
vorokami Feb 8, 2022
b5ebd2c
added getting info about items inside cluster on click ios
vorokami Feb 8, 2022
ba7e5f5
added constant for minimal value of count of elements in cluster ios
vorokami Feb 8, 2022
61318d6
changed text of count markers inside of cluster ios
vorokami Feb 8, 2022
8847146
changed markerId to id, deleted method getJSONForClusterItem(), added…
vorokami Feb 9, 2022
27ec012
changed markerId to id everywhere android
vorokami Feb 9, 2022
3a3bd5e
repair tap on marker and added didTapOnClusterItem click
vorokami Feb 9, 2022
0a775e4
added setter for id of marker in marker preferences android
vorokami Feb 9, 2022
8c35768
changed returning values of marker
vorokami Feb 9, 2022
b7dd501
tapMarker -> tapSingleMarker and tapClusterItem -> tapMarker
vorokami Feb 9, 2022
6500e31
added native plugin method clearMap() ios
vorokami Feb 9, 2022
13efb8c
changed returning values of marker and cluster ios
vorokami Feb 9, 2022
d9ac85c
deleted some debug code
vorokami Feb 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CapacitorCommunityCapacitorGooglemapsNative.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '12.0'
s.dependency 'Capacitor'
s.dependency 'GoogleMaps'
s.dependency 'Google-Maps-iOS-Utils'
s.static_framework = true
end
46 changes: 28 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<a href="https://www.npmjs.com/package/@capacitor-community/capacitor-googlemaps-native"><img src="https://img.shields.io/npm/dw/@capacitor-community/gcapacitor-googlemaps-native?style=flat-square" /></a>
<a href="https://www.npmjs.com/package/@capacitor-community/capacitor-googlemaps-native"><img src="https://img.shields.io/npm/v/@capacitor-community/capacitor-googlemaps-native?style=flat-square" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<a href="#contributors"><img src="https://img.shields.io/badge/all%20contributors-13-orange?style=flat-square" /></a>
<a href="#contributors-"><img src="https://img.shields.io/badge/all_contributors-17-orange.svg?style=flat-square" /></a>
<!-- ALL-CONTRIBUTORS-BADGE:END -->
</p>

Expand All @@ -30,20 +30,6 @@ Maps SDK for Android & iOS bring better performance and offline caching compared
| -----------| -------| -------|
| Hemang Kumar | [hemangsk](https://github.com/hemangsk) | <a href="mailto:[email protected]">[email protected]</a> |

## Support Development
If you like this plugin and use it on your projects, please consider donating to support the development. Thank you!

<table>
<tr>
<td>
<a href="https://paypal.me/HEMANGKUMAR"><img src="https://img.shields.io/badge/Paypal-Support%20via%20Paypal-blue?style=for-the-badge&logo=paypal"></a>
</td>
<td>
<a href="https://www.buymeacoffee.com/hemang"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=hemang&button_colour=5F7FFF&font_colour=ffffff&font_family=Inter&outline_colour=000000&coffee_colour=FFDD00"></a>
</td>
</tr>
</table>

## Project Status

| Features | Android | &nbsp; &nbsp; iOS &nbsp; &nbsp; | Current Status | Pending |
Expand Down Expand Up @@ -80,7 +66,8 @@ You'll have two API keys by the end of this step. Lets proceed:

### Add API key to your App

- [Android](https://developers.google.com/maps/documentation/android-sdk/get-api-key) in AndroidManifest.xml:
#### Android
[Android](https://developers.google.com/maps/documentation/android-sdk/get-api-key) in AndroidManifest.xml:
```
<application>
...
Expand All @@ -91,6 +78,23 @@ You'll have two API keys by the end of this step. Lets proceed:
...
</application>
```
As of [Capacitor 3](https://capacitorjs.com/docs/updating/3-0), the plugin needs to be registered in MainActivity.java:
```java
import com.hemangkumar.capacitorgooglemaps.CapacitorGoogleMaps;
//...

public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

// ...
registerPlugin(CapacitorGoogleMaps.class);
}
}

```
#### iOS
- On iOS, this step is little different and mentioned below.

### Importing & Initializing the plugin
Expand All @@ -112,13 +116,13 @@ await CapacitorGoogleMaps.initialize({

`component.html`

```
```html
<div id="map" #map></div>
```

`component.css`

```
```css
#map {
margin: 2em 1em;
height: 250px;
Expand Down Expand Up @@ -196,6 +200,12 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://www.selectedpixel.com/"><img src="https://avatars.githubusercontent.com/u/28204537?v=4?s=100" width="100px;" alt=""/><br /><sub><b>selected-pixel-jameson</b></sub></a><br /><a href="https://github.com/capacitor-community/capacitor-googlemaps-native/issues?q=author%3Aselected-pixel-jameson" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/ChiKaLiO"><img src="https://avatars.githubusercontent.com/u/12167528?v=4?s=100" width="100px;" alt=""/><br /><sub><b>chikalio</b></sub></a><br /><a href="https://github.com/capacitor-community/capacitor-googlemaps-native/issues?q=author%3AChiKaLiO" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://www.tickeri.com/"><img src="https://avatars.githubusercontent.com/u/1047598?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Javier Gonzalez</b></sub></a><br /><a href="https://github.com/capacitor-community/capacitor-googlemaps-native/commits?author=J-Gonzalez" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/parawanderer"><img src="https://avatars.githubusercontent.com/u/37834723?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Shane B.</b></sub></a><br /><a href="https://github.com/capacitor-community/capacitor-googlemaps-native/commits?author=parawanderer" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/dragermrb"><img src="https://avatars.githubusercontent.com/u/11479696?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Manuel Rodríguez</b></sub></a><br /><a href="https://github.com/capacitor-community/capacitor-googlemaps-native/commits?author=dragermrb" title="Code">💻</a></td>
<td align="center"><a href="https://jamilusalism.github.io/"><img src="https://avatars.githubusercontent.com/u/20730765?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jamilu Salisu</b></sub></a><br /><a href="https://github.com/capacitor-community/capacitor-googlemaps-native/commits?author=jamilusalism" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/rastafan"><img src="https://avatars.githubusercontent.com/u/7632849?v=4?s=100" width="100px;" alt=""/><br /><sub><b>rastafan</b></sub></a><br /><a href="https://github.com/capacitor-community/capacitor-googlemaps-native/commits?author=rastafan" title="Code">💻</a></td>
</tr>
</table>

Expand Down
32 changes: 26 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.12'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.2.0'
}


buildscript {
repositories {
Expand All @@ -11,11 +7,18 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.0"
}
}

apply plugin: 'com.android.library'

ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.12'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.2.0'
}

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 29
defaultConfig {
Expand All @@ -24,16 +27,27 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

manifestPlaceholders = [ MAPS_API_KEY:"debugKey" ]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

manifestPlaceholders = [ MAPS_API_KEY:"prodKey" ]
}
}
lintOptions {
abortOnError false
}
sourceSets {
main {
assets {
srcDirs 'src/main/assets', 'src/main/marker-categories-assets', 'src/main/assets/marker-categories'
}
}
}
}

repositories {
Expand All @@ -49,5 +63,11 @@ dependencies {
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'

implementation 'com.google.maps.android:android-maps-utils:2.3.0'
implementation 'com.google.android.gms:play-services-maps:18.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation("androidx.appcompat:appcompat:1.3.0")

}

2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ org.gradle.jvmargs=-Xmx1536m

# Supports AndroidX
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
17 changes: 17 additions & 0 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hemangkumar.capacitorgooglemaps.capacitorgooglemaps">

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application>
<!-- Google maps metadata -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyChhpqvHkC4KDqoclEC8GN1tvPQMNklkA4" />
</application>

<!-- Permissions -->

<uses-permission android:name="android.permission.INTERNET" />

<!-- Geolocation API -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />
</manifest>

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading