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

app crashed when setupMarkerCluster in Angular #14

Open
sedrak1987 opened this issue Sep 29, 2018 · 3 comments
Open

app crashed when setupMarkerCluster in Angular #14

sedrak1987 opened this issue Sep 29, 2018 · 3 comments

Comments

@sedrak1987
Copy link

app crashed when setupMarkerCluster in NS Angular app

@fawadmukhtar
Copy link

@sedrak1987 remove this mapView._markers.push(marker); statement form this method setupMarkerCluster() in index.android.ts

@sedrak1987
Copy link
Author

dear where is index.android.ts file?(maybe in node_modules, if yes, then why I must change core files)

@kandangit
Copy link

I have the same issue , the app is crashing in setupMarkerCluster method call.

The crash seems to happen in this line of index.android.js:

clusterManager.addItem(markerItem);

If I comment that line, the app won´t crash but obviously no marks are displayed.

Note: occasionally I have seen the app working fine in the emulator (no crash, cluster displayed) by removing the comment to the line that was crashing (hot reload). However, stopping and deploying again the app in the emulator or building the apk and testing in a real device will make it crash again.

Testing on NativeScript 5, Angular project that just has a home component with the map and a function to add markers on map ready event (similar to the demo project). More info from package.json:

    "nativescript": {
        "id": "org.nativescript.testmaps",
        "tns-android": {
            "version": "5.4.0"
        },
        "tns-ios": {
            "version": "5.4.2"
        }
    },
    "description": "NativeScript Application",
    "license": "SEE LICENSE IN <your-license-filename>",
    "repository": "<fill-your-repository-here>",
    "dependencies": {
        "@angular/animations": "~8.0.0",
        "@angular/common": "~8.0.0",
        "@angular/compiler": "~8.0.0",
        "@angular/core": "~8.0.0",
        "@angular/forms": "~8.0.0",
        "@angular/http": "~8.0.0-beta.10",
        "@angular/platform-browser": "~8.0.0",
        "@angular/platform-browser-dynamic": "~8.0.0",
        "@angular/router": "~8.0.0",
        "nativescript-angular": "~8.0.0",
        "nativescript-geolocation": "^5.1.0",
        "nativescript-google-maps-sdk": "2.6.1",
        "nativescript-google-maps-utils": "^0.1.3",
        "nativescript-theme-core": "~1.0.4",
        "reflect-metadata": "~0.1.12",
        "rxjs": "~6.5.0",
        "tns-core-modules": "~5.4.0",
        "zone.js": "~0.9.1"
    },
    "devDependencies": {
        "@angular/compiler-cli": "~8.0.0",
        "@ngtools/webpack": "~8.0.0",
        "nativescript-dev-typescript": "~0.10.0",
        "nativescript-dev-webpack": "~0.24.0"
    },

It would be very good to have this working since this is a useful feature and no other NativeScript plugin seems to exist that provides clustering and heatmaps functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants