Utilisation des composants PocketMaps dans Windev ( Pcsoft )
Aucune réponse
AlanBaccharetti
Utilisation des composants PocketMaps dans Windev ( Pcsoft )
Besoin initial :
Utiliser la cartographie et la navigation en mode Hors-ligne dans une application WinDev mobile.
Trouver un spécialiste Windev+Javascript
Problématique :
Transposer le code du projet Android dans WinDev mobile (langage Javascript)
Plusieurs projets ont déjà été transposé depuis du JS vers du Windev, mais jamais aussi complexe.
Un projet WinDev a été débuté ( téléchargement des cartes et affichage Carte )
Fonctions utiles dans le projet Android :
- MapHandler.java
public void init(MapView mapView, String currentArea, File mapsFolder)
public void loadMap(File areaFolder, MapActivity activity)
void loadGraphStorage(final MapActivity activity) {
Différentes techniques ont été tentées :
- Via un champ HTML, mais ne fonctionne bien que lorsque l’on utilise des fichiers .js, mais les .java ne passent pas bien sans refaire la synthaxe.
- Via un champ Natif, mais tres difficile a debugger lorsque la compilation ne passe pas.
1. Projet GITHub à transposer
https://github.com/junjunguo/PocketMaps
Free offline maps with routing functions and more ...
This project uses OSM data, Mapsforge-vtm and Graphhopper open source API.
Erreur retournée :
:compileReleaseJavaWithJavac
C:Mes Projets TestsPocketMaps_POCAndroidgensrccommasocietepocketmaps_pocwdgenGWDCPCOL_Carte_PocketMaps_Android.java:139: error: cannot find symbol
MapView mapView = new MapView(document.getElementById(sNomChampCarte));
^
symbol: variable document
location: class GWDCPCOL_Carte_PocketMaps_Android
C:Mes Projets TestsPocketMaps_POCAndroidgensrccommasocietepocketmaps_pocwdgenGWDCPCOL_Carte_PocketMaps_Android.java:148: error: cannot find symbol
tileSource.setMapFile(new File(areaFolder, currentArea + ".map").getAbsolutePath());
^
symbol: variable areaFolder
location: class GWDCPCOL_Carte_PocketMaps_Android
C:Mes Projets TestsPocketMaps_POCAndroidgensrccommasocietepocketmaps_pocwdgenGWDCPCOL_Carte_PocketMaps_Android.java:148: error: cannot find symbol
tileSource.setMapFile(new File(areaFolder, currentArea + ".map").getAbsolutePath());
^
symbol: variable currentArea
location: class GWDCPCOL_Carte_PocketMaps_Android
Note: C:Mes Projets TestsPocketMaps_POCAndroidgensrccommasocietepocketmaps_pocwdgenGWDFFEN_Main_Mobile.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
> Task :compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.