Problèmes
API de VISU 1.0beta4 semble poser problème avec le XML version 1.1
L'utilisation de l'API de VISU 1.0beta4 semble poser problème avec le XML version 1.1 http://api.ign.fr/geoportail/api?v=1.0beta4&key=01010101010101010101&instance=VISU
avec un appel de visualisation d'un GPX
VISU.getMap().addLayer( "GPX", "27-DEC-09", "http://www.placeoweb.com/gps/gpx/files/2010-01-02-163929_82.242.241.8_vtt_-_montazels_-_27dec.gpx" );
Avec Google Chrome (3.0.195.38)
Pas de problème, cela fonctionne.
Avec Firefox (3.5.6)
Erreur : déclaration XML mal formée Fichier Source : http://www.placeoweb.com/gps/gpx/trace.php?gpx=2010-01-02-163929_82.242.241.8_vtt_-_montazels_-_27dec.gpx Ligne : 1, Colonne : 16 (le second 1 de 1.1) Code Source : <?xml version="1.1" encoding="UTF-8" ?>
Avec Internet Explorer 8 :
Détails de l’erreur de la page Web Agent utilisateur : Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Horodateur : Sat, 2 Jan 2010 15:57:50 UTC Message : 'this.getMap().allowedGeoportalLayers' a la valeur Null ou n'est pas un objet. Ligne : 12107 Caractère : 8 Code : 0 URI : http://api.ign.fr/geoportail/api/js/1.0beta4/Geoportal.js
Vis a vis du XML 1.1 je ne vois pas pourquoi il y aurait un problème avec le fichier : http://www.placeoweb.com/gps/gpx/files/2010-01-02-163929_82.242.241.8_vtt_-_montazels_-_27dec.gpx
<?xml version="1.1" encoding="UTF-8" ?> <gpx version="1.1" creator="CartoExploreur 3 3.13" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"> <metadata> <time>2009-12-27T17:28:29Z</time> <bounds maxlat="42.963775881" maxlon="2.232665671" minlat="42.916667322" minlon="2.188734608" /> </metadata> <trk> <name>27-DEC-09</name> <trkseg> <trkpt lat="42.938296739" lon="2.231837539"> <ele>239.505493</ele> </trkpt>
Alors qu'en modifiant la première ligne en
<?xml version="1.0" encoding="UTF-8" ?>
cela fonctionne parfaitement....
Ressources
api.ign.fr/geoportail/
- Documentation
- Exemples
- Questions fréquentes (FAQ)
- Forum API Géoportail en partenariat avec le site developpez.com.
- Contactez-nous