Bonjour,

j'ai un petit problème de développement que je ne comprends vraiment pas :
j'ai une google Map et un fichier JSON (que je parse avec REALM (une bdd locale sur le téléphone)), dans mon fichier JSON j'ai mes localisations de mes objets je les récupère donc et les affiche sur ma carte sauf que mes objets se localisent aux Pakistan alors qu'ils sont à PARIS.. j'ai bien vérifier que je récupérais des doubles en vain, mon markeur s'affiche bien et si je met les valeurs en dure dans le code l'objet se place bien à Paris :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  Realm realm = Realm.getInstance(myContext);
        RealmResults resultRealm = realm.allObjects(Restaurant.class);
        for (int i = 0; i < resultRealm.size(); i++) {
            Restaurant r = (Restaurant) resultRealm.get(i);
            String name_restaurant = r.getName();
            double latitude_restaurant = r.getLatitude();
            double longitude_restaurant = r.getLatitude();
            // Drawing marker on the map
 
            MarkerOptions markerOptions = new MarkerOptions();
 
 
            // Getting name
            String name = "place_name";
 
            double d = (double)latitude_restaurant;
            double l = (double)longitude_restaurant;
 
            LatLng latLng = new LatLng(d, l);
           /* LatLng latLng = new LatLng(49.0445701, 2.0691226); */
 
            // Setting the position for the marker
            markerOptions.position(latLng);
 
            // Setting the title for the marker.
            //This will be displayed on taping the marker
            markerOptions.title(name);
 
 
            // Placing a marker on the touched position
            mMap.addMarker(markerOptions);
 
        }
Merci par avance pour votre aide