Skip to content

Commit 66079af

Browse files
author
farfromrefug
committed
Merge remote-tracking branch 'origin/alpimaps' into alpimaps
2 parents 2b36b96 + b70341e commit 66079af

File tree

60 files changed

+5223
-3601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5223
-3601
lines changed

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NativeScript
22
hooks/
33
node_modules/
4-
/platforms/
4+
platforms
55

66
# NativeScript Template
77
*.js.map
@@ -43,8 +43,10 @@ packages/**/*.d.ts
4343
bin
4444
build
4545
Pods
46-
!packages/platforms
46+
!packages/*/platforms
4747
/packages/**/*.aar
48+
/packages/**/*.framework
49+
/packages/**/*.xcframework
4850
/demo-snippets/**/*.aar
4951
*.xcuserdatad
5052
/packages/README.md

.yarnrc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
compressionLevel: mixed
2+
13
nmHoistingLimits: workspaces
24

35
nodeLinker: node-modules
46

5-
yarnPath: tools/.yarn/releases/yarn-3.6.4.cjs
7+
yarnPath: tools/.yarn/releases/yarn-4.0.1.cjs

demo-snippets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"version": "0.0.1",
55
"dependencies": {
6-
"@nativescript-community/ui-carto": "file:../packages/ui-carto",
6+
"@nativescript-community/ui-carto": "*",
77
"vue-property-decorator": "9.1.2"
88
}
99
}

demo-snippets/svelte/BasicRaster.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { RasterTileLayer } from '@nativescript-community/ui-carto/layers/raster';
55
import { VectorLayer } from '@nativescript-community/ui-carto/layers/vector';
66
import { CartoMap } from '@nativescript-community/ui-carto/ui';
7-
import { PanningMode } from '@nativescript-community/ui-carto/ui/index.android';
7+
import { PanningMode } from '@nativescript-community/ui-carto/ui';
88
import { setShowDebug, setShowError, setShowInfo, setShowWarn } from '@nativescript-community/ui-carto/utils';
99
import { Line, LineEndType, LineJointType, LineStyleBuilder } from '@nativescript-community/ui-carto/vectorelements/line';
1010
import { Marker, MarkerStyleBuilder } from '@nativescript-community/ui-carto/vectorelements/marker';
@@ -14,8 +14,13 @@ import { PanningMode } from '@nativescript-community/ui-carto/ui/index.android';
1414
let cartoMap: CartoMap;
1515
let rasterLayer: RasterTileLayer;
1616
17+
function logEvent(e) {
18+
console.log(e.eventName, Object.keys(e))
19+
}
20+
1721
function onMainMapReady(e) {
1822
cartoMap = e.object as CartoMap;
23+
console.log('onMainMapReady');
1924
const options = cartoMap.getOptions();
2025
options.setWatermarkScale(0);
2126
options.setRestrictedPanning(true);
@@ -112,6 +117,6 @@ import { PanningMode } from '@nativescript-community/ui-carto/ui/index.android';
112117
<navigationButton text="Go back" on:tap={() => goBack()} />
113118
</actionBar>
114119
<gridLayout class="page">
115-
<cartomap zoom="10" on:mapReady={onMainMapReady} />
120+
<cartomap zoom="10" on:mapReady={onMainMapReady} on:mapMove={logEvent} on:mapStable={logEvent} on:mapIdle={logEvent} on:mapClicked={logEvent} on:mapInteraction={logEvent}/>
116121
</gridLayout>
117122
</page>

lerna.json

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,32 @@
11
{
22
"version": "1.8.11",
3+
"$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
34
"packages": [
45
"packages/*"
56
],
67
"npmClient": "yarn",
78
"useWorkspaces": true,
89
"command": {
910
"publish": {
10-
"conventionalCommits": true,
11-
"conventionalBlacklist": [
12-
"chore"
13-
],
14-
"changelogPreset": "angular",
15-
"createRelease": "github",
16-
"commitHooks": false,
17-
"private": false,
18-
"ignoreChanges": [
19-
"*.md",
20-
"docs/**"
21-
]
22-
},
23-
"version": {
24-
"conventionalCommits": true,
25-
"conventionalBlacklist": [
26-
"chore"
27-
],
28-
"changelogPreset": "angular",
29-
"createRelease": "github",
30-
"commitHooks": false,
31-
"private": false,
32-
"ignoreChanges": [
33-
"*.md",
34-
"docs/**"
35-
]
36-
},
37-
"bootstrap": {
38-
"npmClientArgs": [
39-
"--no-package-lock"
11+
"cleanupTempFiles": true,
12+
"removePackageFields": [
13+
"devDependencies",
14+
"scripts"
4015
]
4116
}
42-
}
17+
},
18+
"npmClientArgs": [
19+
"--no-package-lock"
20+
],
21+
"commitHooks": false,
22+
"createRelease": "github",
23+
"conventionalCommits": true,
24+
"private": false,
25+
"message": "chore(release): publish new version %v",
26+
"changelogPreset": "conventional-changelog-conventionalcommits",
27+
"ignoreChanges": [
28+
"**/__fixtures__/**",
29+
"**/__tests__/**",
30+
"**/*.md"
31+
]
4332
}

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"demo.vue.ios": "cd ./demo-vue && ns run ios --no-hmr --env.watchNodeModules",
2323
"demo.vue.clean": "cd ./demo-vue && ns clean",
2424
"postinstall": "npm run setup",
25-
"publish": "npm run setup && npm run clean && npm run build.all && npm run readme && npm run doc && npm run commit_readme_doc_changes ; lerna publish",
25+
"publish": "npm run setup && npm run clean && npm run build.all && npm run readme && npm run doc && npm run commit_readme_doc_changes && lerna publish",
2626
"readme": "lerna run readme && node ./tools/readme.js",
2727
"setup": "npm run submodules && ts-patch install",
2828
"start": "./node_modules/.bin/ntl -A -s 15 -o",
@@ -31,7 +31,7 @@
3131
"update": "node ./tools/update.js",
3232
"fullclean": "npm run clean && rimraf 'packages/**/node_modules' 'demo-*/hooks' 'demo-*/node_modules' 'package-lock.json' 'pnpm-lock.yaml' 'node_modules'",
3333
"doc": "node tools/builddoc.mjs",
34-
"commit_readme_doc_changes": "git add docs/** *.md ; git commit -m \"readme/doc\""
34+
"commit_readme_doc_changes": "git add docs/** *.md ; git commit -m \"readme/doc\" ; echo \"commit readme doc done\""
3535
},
3636
"commitlint": {
3737
"extends": [
@@ -62,11 +62,6 @@
6262
},
6363
"workspaces": [
6464
"packages/*",
65-
"demo-vue",
66-
"demo-vue3",
67-
"demo-ng",
68-
"demo-svelte",
69-
"demo-react",
70-
"demo-snippets"
65+
"demo*"
7166
]
7267
}

packages/ui-carto/platforms/android/java/com/akylas/carto/additions/AKRoutingServiceAdditions.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum RoutingAction {
4545
static final String TAG = "AKRoutingServiceAdditions";
4646
static Handler mainHandler = null;
4747

48-
public static void calculateRoute (final RoutingService service, final RoutingRequest request, final String profile, final RoutingServiceRouteCallback callback ) {
48+
public static void calculateRoute (final RoutingService service, final RoutingRequest request, final String profile, final Boolean stringify, final RoutingServiceRouteCallback callback) {
4949
Thread thread = new Thread(new Runnable() {
5050
@Override
5151
public void run() {
@@ -62,28 +62,29 @@ public void run() {
6262
mainHandler.post(new Runnable() {
6363
@Override
6464
public void run() {
65-
callback.onRoutingResult(e, null);
65+
callback.onRoutingResult(e, null, null);
6666
}
6767
});
6868
} else {
69-
callback.onRoutingResult(e, null);
69+
callback.onRoutingResult(e, null, null);
7070
}
7171
return;
7272
}
7373

7474
final RoutingResult fRa = result;
75+
final String fStrResult = stringify ? stringifyRoutingResult(result) : null;
7576
if (AKMapView.RUN_ON_MAIN_THREAD) {
7677
if (mainHandler == null) {
7778
mainHandler = new Handler(android.os.Looper.getMainLooper());
7879
}
7980
mainHandler.post(new Runnable() {
8081
@Override
8182
public void run() {
82-
callback.onRoutingResult(null, fRa);
83+
callback.onRoutingResult(null, fRa, fStrResult);
8384
}
8485
});
8586
} else {
86-
callback.onRoutingResult(null, fRa);
87+
callback.onRoutingResult(null, fRa, fStrResult);
8788
}
8889

8990
}

packages/ui-carto/platforms/android/java/com/akylas/carto/additions/RoutingServiceRouteCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
import com.carto.routing.RoutingResult;
44

55
public interface RoutingServiceRouteCallback {
6-
void onRoutingResult(Exception e, RoutingResult result);
6+
void onRoutingResult(Exception e, RoutingResult result, String strResult);
77
}

0 commit comments

Comments
 (0)