Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site. Si vous continuez à utiliser ce dernier, nous considèrerons que vous acceptez l'utilisation des cookies. J'ai compris ! ou En savoir plus !.
banniere

Le portail francophone de la géomatique


Toujours pas inscrit ? Mot de passe oublié ?
Nom d'utilisateur    Mot de passe              Toujours pas inscrit ?   Mot de passe oublié ?

Annonce

Rencontres QGIS 2025

L'appel à participation est ouvert jusqu'au 19 janvier 2025!

#1 Wed 01 February 2012 10:36

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

[Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

je cherche la méthode pour créer une ligne à partir de multiples points wgs84.

J'ai essayé sans succès :

Code:

var gpx = new OpenLayers.Layer.LinearRing(<?php echo $coordonnees; ?>), {
            format: OpenLayers.Format,
                style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5},
                projection: new OpenLayers.Projection("EPSG:4326")
            });
            map.addLayer(gpx);

ou $coordonnees est une variable remontant les coordonnées sous forme lon,lat lon,lat...


Pouvez-vous me guider ?

merci.

Dernière modification par heretik25 (Wed 01 February 2012 10:37)


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#2 Sun 05 February 2012 16:09

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

L'API indique que le constructeur nécessite un tableau de OpenLayers.Geometry.Point.

Donc il faut le faire en plusieurs étape, présenté ici en pure JavaScript :

Code:

/** on part de deux variables existantes lat et lon, de type array et de même longueur.
** Ceux-ci peuvent venir d'une requête AJAX qui renvoie un json simple.
**/
var point new Array;
for(i=0; i < lat.lentgh; i++) {
  point[] = OpenLayers.Geometry.Point(lat[i],lon[i]);
}

var gpx = new OpenLayers.Layer.LinearRing(point, {
            format: OpenLayers.Format,
                style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5},
                projection: new OpenLayers.Projection("EPSG:4326")
 });

http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Geometry/LinearRing-js.html#OpenLayers.Geometry.LinearRing.OpenLayers.Geometry.LinearRing

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#3 Mon 06 February 2012 10:50

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour et merci pour la proposition,

J'ai utilisé votre code et dynamiquement en php, j'ajoute les coordonnées

Voici le code source généré :


Code:

var gpx = new OpenLayers.Layer.LinearRing(6.07952,47.2839 6.07952,47.2839 6.07952,47.2839 6.07952,47.2839 6.07952,47.2839 6.07952,47.2839 6.07952,47.2839 6.08125,47.2853 6.08133,47.2854 6.08162,47.2857 6.08203,47.2859 6.08235,47.2861 6.08263,47.2864 6.08282,47.2867 6.08297,47.287 6.08308,47.2872 6.08345,47.2874 6.08355,47.2876 6.08376,47.2878 6.08378,47.288 6.08368,47.2884 6.08364,47.2886 6.08396,47.2887 6.08399,47.2886 6.08411,47.2882 6.08414,47.2879 6.08417,47.2877 6.08413,47.2876 6.08417,47.2875 6.0842,47.2875 6.08428,47.2875 6.08438,47.2875 6.08441,47.2879 6.08444,47.2881 6.08443,47.2883 6.0844,47.2884 6.08439,47.2885 6.08432,47.2886 6.08427,47.2889 6.08429,47.2889 6.08428,47.2893 6.08426,47.2893 6.08421,47.2894 6.08402,47.2894 6.08398,47.2895 6.08384,47.2895 6.08375,47.2896 6.08372,47.2896 6.08371,47.2897 6.08373,47.2899 6.08374,47.29 6.0838,47.2902 6.08388,47.2903 6.08398,47.2903 6.08401,47.2904 6.08405,47.2904 6.08405,47.2905 6.08397,47.2906 6.08384,47.2906 6.08365,47.2906 6.08353,47.2906 6.08347,47.2906 6.08339,47.2906 6.08324,47.2905 6.08318,47.2905 6.08312,47.2904 6.08304,47.2903 6.083,47.2903 6.08252,47.29 6.0817,47.2896 6.08112,47.2894 6.08087,47.2893 6.08053,47.2892 6.08049,47.2892 6.08045,47.2892 6.07992,47.2888 6.0799,47.2888 6.07971,47.2889 6.0796,47.2889 6.07944,47.289 6.07941,47.2891 6.07914,47.2893 6.07908,47.2893 6.07873,47.2896 6.0787,47.2896 6.07864,47.2896 6.0786,47.2896 6.07847,47.2897 6.07831,47.2897 6.07825,47.2898 6.07797,47.2899 6.07788,47.2899 6.07781,47.2899 6.07774,47.29 6.07769,47.29 6.07763,47.29 6.07718,47.2903 6.07693,47.2904 6.07641,47.2902 6.07557,47.2899 6.07506,47.2899 6.07499,47.2899 6.07468,47.29 6.0746,47.29 6.07399,47.2903 6.0735,47.2906 6.07298,47.2909 6.07257,47.291 6.07223,47.2912 6.07196,47.2913 6.07167,47.2915 6.07163,47.2915 6.07126,47.2918 6.07118,47.2918 6.07114,47.2919 6.07107,47.292 6.07079,47.2922 6.07074,47.2922 6.07072,47.2922 6.07068,47.2922 6.07033,47.2925 6.07009,47.2927 6.06997,47.2928 6.06986,47.2929 6.06962,47.2932 6.06959,47.2932 6.06934,47.2934 6.06932,47.2934 6.06913,47.2936 6.06911,47.2936 6.06889,47.2937 6.06871,47.2939 6.06866,47.2939 6.0686,47.294 6.06837,47.2942 6.06834,47.2942 6.06811,47.2943 6.068,47.2944 6.06796,47.2945 6.06793,47.2945 6.06787,47.2945 6.06785,47.2945 6.06785,47.2945 6.06774,47.2946 6.0675,47.2948 6.06745,47.2949 6.06736,47.2949 6.06731,47.295 6.06728,47.295 6.06719,47.2951 6.0671,47.2952 6.06706,47.2952 6.06693,47.2954 6.06667,47.2955 6.06657,47.2955 6.06655,47.2955 6.06649,47.2956 6.06639,47.2957 6.0662,47.2958 6.06591,47.2961 6.06584,47.2961 6.06583,47.2961 6.0658,47.2962 6.06561,47.2963 6.06555,47.2963 6.06545,47.2965 6.0653,47.2965 6.06515,47.2966 6.06489,47.2968 6.06486,47.2969 6.06481,47.2969 6.06438,47.2972 6.06404,47.2975 6.06351,47.2979 6.06294,47.2984 6.06286,47.2985 6.0627,47.2985 6.06231,47.2987 6.06221,47.2987 6.06211,47.2988 6.06211,47.2988 6.06205,47.299 6.06202,47.2991 6.06196,47.2991 6.06173,47.2994 6.06167,47.2995 6.06164,47.2995 6.06162,47.2995 6.06128,47.2998 6.06124,47.2998 6.06101,47.3 6.06088,47.3001 6.06087,47.3001 6.0608,47.3002 6.06076,47.3002 6.06075,47.3002 6.06069,47.3003 6.06049,47.3004 6.06043,47.3005 6.06042,47.3005 6.06039,47.3005 6.06037,47.3005 6.06036,47.3005 6.06028,47.3005 6.06027,47.3005 6.06026,47.3005 6.06019,47.3004 6.06012,47.3004 6.06005,47.3003 6.06,47.3003 6.05999,47.3003 6.05965,47.3 6.05929,47.2996 6.05862,47.2991 6.05803,47.2986 6.05743,47.2981 6.05727,47.2979 6.0572,47.2979 6.05703,47.2977 6.05698,47.2977 6.05676,47.2975 6.0564,47.2972 6.05614,47.297 6.05579,47.2967 6.05554,47.2965 6.05528,47.2963 6.05513,47.2962 6.05509,47.2961 6.05444,47.2957 6.0542,47.2956 6.05413,47.2956 6.05389,47.2955 6.05383,47.2954 6.05371,47.2953 6.05368,47.2952 6.05366,47.2952 6.05366,47.2951 6.05367,47.2951 6.0537,47.295 6.05374,47.295 6.05376,47.2949 6.0538,47.2949 6.05383,47.2949 6.05402,47.2948 6.05404,47.2948 6.05409,47.2948 6.05412,47.2948 6.05416,47.2948 6.0542,47.2948 6.05424,47.2948 6.05434,47.2949 6.05437,47.2948 6.05438,47.2949 6.0547,47.2951 6.05472,47.2952 6.05473,47.2952 6.05423,47.2955 6.0541,47.2956 6.05361,47.2959 6.05323,47.2962 6.05304,47.2963 6.05293,47.2965 6.05291,47.2965 6.05291,47.2965 6.0529,47.2966 6.05256,47.2969 6.05188,47.2972 6.05125,47.2973 6.0511,47.2974 6.05106,47.2974 6.05056,47.2975 6.05053,47.2975 6.05009,47.2976 6.05006,47.2976 6.05003,47.2976 6.05001,47.2976 6.04999,47.2976 6.04998,47.2976 6.04997,47.2976 6.04982,47.2975 6.0498,47.2975 6.04971,47.2975 6.04911,47.2978 6.04898,47.2981 6.04897,47.2981 6.04896,47.2981 6.04895,47.2981 6.04859,47.2983 6.04855,47.2983 6.04788,47.2984 6.04767,47.2984 6.04731,47.2985 6.04685,47.2985 6.04641,47.2986 6.04637,47.2986 6.04635,47.2986 6.04633,47.2986 6.04609,47.2987 6.04584,47.2986 6.04511,47.2986 6.04414,47.2988 6.04373,47.299 6.0435,47.2992 6.0429,47.2995 6.04246,47.2998 6.04179,47.3001 6.0417,47.3002 6.04163,47.3002 6.04158,47.3003 6.04155,47.3004 6.04153,47.3004 6.04149,47.3006 6.04147,47.3006 6.04145,47.3007 6.04116,47.3011 6.04093,47.3013 6.04071,47.3015 6.04069,47.3015 6.04067,47.3015 6.04066,47.3015 6.04065,47.3016 6.04063,47.3016 6.04061,47.3016 6.04059,47.3016 6.04057,47.3016 6.04055,47.3016 6.04053,47.3016 6.0405,47.3016 6.04048,47.3016 6.04045,47.3016 6.04043,47.3016 6.0404,47.3016 6.04035,47.3016 6.0403,47.3017 6.0402,47.3017 6.04016,47.3017 6.04014,47.3017 6.04012,47.3017 6.0401,47.3017 6.04007,47.3018 6.03966,47.3018 6.03955,47.3018 6.03953,47.3018 6.03911,47.3019 6.03886,47.3019 6.03839,47.302 6.03824,47.302 6.03773,47.3019 6.03692,47.3019 6.03676,47.3019 6.03588,47.3016 6.03524,47.3013 6.03471,47.3008 6.03468,47.3008 6.03459,47.3007 6.03456,47.3006 6.03439,47.3004 6.0342,47.3 6.03419,47.2999 6.03403,47.2993 6.03387,47.299 6.03385,47.2989 6.03355,47.2983 6.03326,47.2978 6.03278,47.2973 6.03241,47.2969 6.032,47.2966 6.03135,47.2964 6.03084,47.2965 6.03083,47.2965 6.03085,47.2966 6.03088,47.2966 6.03091,47.2966 6.03094,47.2967 6.03107,47.2968 6.03111,47.2968 6.03114,47.2968 6.03142,47.2974 6.03147,47.2978 6.0314,47.2981 6.03129,47.2984 6.03128,47.2984 6.03128,47.2985 6.03112,47.2988 6.03111,47.2988 6.03111,47.2988 6.03093,47.2991 6.03088,47.2992 6.03088,47.2992 6.03077,47.2995 6.03079,47.2995 6.03077,47.2995 6.03058,47.3 6.0306,47.3001 6.03061,47.3001 6.03063,47.3001 6.03064,47.3001 6.03066,47.3001 6.03069,47.3001 6.0307,47.3001 6.03093,47.3002 6.03111,47.3003 6.03114,47.3003 6.03116,47.3004 6.03141,47.3006 6.0315,47.3007 6.03151,47.3008 6.03152,47.3008 6.03151,47.3008 6.03151,47.3008 6.03152,47.3009 6.03153,47.3009 6.0315,47.3012 6.03143,47.3015 6.03144,47.3015 6.03143,47.3016 6.03142,47.3016 6.03142,47.302 6.03179,47.3024 6.03196,47.3026 6.03205,47.3027 6.03224,47.3029 6.03239,47.303 6.03266,47.3033 6.03283,47.3034 6.03315,47.3037 6.03348,47.3039 6.03378,47.3041 6.0338,47.3041 6.03381,47.3041 6.03383,47.3041 6.03386,47.3041 6.03398,47.3041 6.03403,47.3042 6.03415,47.3044 6.03411,47.3045 6.03408,47.3045 6.03407,47.3045 6.03403,47.3045 6.03401,47.3044 6.03393,47.3044 6.03387,47.3044 6.03349,47.3042 6.03312,47.3041 6.0331,47.3041 6.03278,47.304 6.03266,47.304 6.03258,47.304 6.03255,47.304 6.03251,47.304 6.03231,47.304 6.03204,47.3039 6.03139,47.3037 6.03113,47.3037 6.0311,47.3037 6.03085,47.3037 6.03083,47.3038 6.03083,47.3038 6.03083,47.3038 6.03083,47.3038 6.03083,47.3038 6.03083,47.3038 6.03085,47.3038 6.03135,47.304 6.03143,47.304 6.03151,47.3041 6.03214,47.3043 6.03254,47.3046 6.03253,47.3046 6.0325,47.3046 6.03247,47.3046 6.03244,47.3046 6.03242,47.3046 6.03239,47.3046 6.03237,47.3046 6.03234,47.3046 6.03233,47.3046 6.03231,47.3046 6.03175,47.3044 6.03133,47.3043 6.03098,47.3042 6.03051,47.304 6.03017,47.304 6.03015,47.304 6.03013,47.304 6.03011,47.304 6.03009,47.304 6.03008,47.304 6.03032,47.3043 6.0307,47.3045 6.03106,47.3048 6.03145,47.3051 6.03187,47.3055 6.03218,47.3057 6.03244,47.3058 6.03276,47.3059 6.03279,47.3059 6.0331,47.306 6.03313,47.306 6.03315,47.3061 6.03328,47.3061 6.0333,47.3061 6.03337,47.3062 6.03379,47.3064 6.0338,47.3064 6.03382,47.3064 6.03384,47.3064 6.03386,47.3064 6.03401,47.3065 6.03403,47.3065 6.03443,47.3066 6.03489,47.3068 6.03534,47.307 6.03571,47.3072 6.03572,47.3072 6.03575,47.3072 6.03623,47.3074 6.03667,47.3076 6.03711,47.3077 6.03712,47.3077 6.03754,47.3078 6.03768,47.3079 6.0377,47.3079 6.03809,47.308 6.0385,47.308 6.03852,47.308 6.03854,47.308 6.03861,47.308 6.03863,47.308 6.03909,47.3081 6.03924,47.3081 6.03926,47.3081 6.03966,47.3081 6.0397,47.3081 6.03972,47.3081 6.03976,47.3081 6.03978,47.3081 6.03981,47.3081 6.03984,47.3081 6.04008,47.3081 6.04023,47.3081 6.04025,47.3081 6.04092,47.3081 6.04079,47.3084 6.04058,47.3084 6.04056,47.3084 6.04053,47.3084 6.04048,47.3084 6.04045,47.3084 6.04042,47.3084 6.03996,47.3084 6.03984,47.3084 6.03951,47.3084 6.03936,47.3085 6.03909,47.3085 6.03905,47.3085 6.03902,47.3085 6.03883,47.3086 6.03877,47.3086 6.03875,47.3086 6.03872,47.3086 6.03869,47.3086 6.03867,47.3086 6.03853,47.3086 6.03851,47.3086 6.03849,47.3087 6.03841,47.3087 6.03839,47.3087 6.03837,47.3087 6.03835,47.3087 6.03833,47.3087 6.03827,47.3087 6.0382,47.3087 6.03818,47.3087 6.03766,47.3088 6.03746,47.3089 6.03743,47.3089 6.03737,47.3089 6.03732,47.3089 6.0373,47.3089 6.03714,47.3089 6.03712,47.3089 6.03675,47.3091 6.03673,47.3091 6.0363,47.3091 6.03625,47.3092 6.0361,47.3093 6.03612,47.3095 6.03619,47.3095 6.03621,47.3095 6.03623,47.3095 6.03662,47.3097 6.03667,47.3097 6.0367,47.3097 6.03672,47.3097 6.03719,47.3096 6.03722,47.3096 6.03724,47.3096 6.03748,47.3095 6.03802,47.3095 6.0386,47.3094 6.03872,47.3094 6.03895,47.3094 6.03899,47.3094 6.0395,47.3094 6.03978,47.3093 6.03992,47.3094 6.04093,47.3092 6.04177,47.3092 6.04252,47.3094 6.04299,47.3095 6.04314,47.3095 6.04317,47.3095 6.0432,47.3095 6.04377,47.3097 6.04437,47.31 6.04492,47.3103 6.04551,47.3106 6.04553,47.3107 6.04557,47.3107 6.04628,47.311 6.04706,47.3113 6.04719,47.3113 6.04725,47.3113 6.04726,47.3113 6.04728,47.3114 6.0473,47.3114 6.04732,47.3114 6.04735,47.3114 6.04827,47.3117 6.04955,47.3121 6.05018,47.3123 6.0503,47.3124 6.05033,47.3124 6.05087,47.3126 6.05158,47.3129 6.05215,47.3132 6.05231,47.3133 6.05233,47.3133 6.05253,47.3134 6.05258,47.3135 6.05299,47.3137 6.05326,47.3139 6.05327,47.3139 6.05355,47.3141 6.05356,47.3142 6.05371,47.3143 6.05373,47.3143 6.05375,47.3143 6.05398,47.3145 6.05401,47.3145 6.05405,47.3146 6.05429,47.3148 6.05431,47.3148 6.0545,47.3149 6.05472,47.3151 6.05501,47.3153 6.05526,47.3155 6.05546,47.3157 6.05567,47.3159 6.05581,47.316 6.05582,47.3161 6.05584,47.3161 6.05616,47.3163 6.0566,47.3166 6.05702,47.3168 6.05725,47.3169 6.05768,47.3171 6.05776,47.3171 6.05779,47.3171 6.05781,47.3171 6.05795,47.3172 6.05804,47.3172 6.05846,47.3174 6.05865,47.3176 6.05866,47.3176 6.05868,47.3176 6.05869,47.3176 6.05871,47.3176 6.05872,47.3176 6.05874,47.3176 6.05896,47.3179 6.05908,47.3181 6.05925,47.3183 6.05957,47.3184 6.05964,47.3185 6.05973,47.3187 6.05969,47.3188 6.05967,47.3188 6.05958,47.3189 6.0597,47.319 6.05974,47.319 6.05977,47.3188 6.05973,47.3188 6.05965,47.3189 6.05979,47.319 6.05988,47.3191 6.05968,47.3189 6.05969,47.3189 6.05972,47.3189 6.05975,47.3188 6.05976,47.3188 6.05979,47.3188 6.05981,47.3188 6.05983,47.3188 6.05986,47.3188 6.05988,47.3188 6.05991,47.3188 6.05993,47.3188 6.05995,47.3188 6.05997,47.3188 6.05999,47.3188 6.06,47.3188 6.06001,47.3187 6.06028,47.3184 6.0603,47.3184 6.06032,47.3184 6.06038,47.3185 6.0604,47.3185 6.06043,47.3184 6.06046,47.3184 6.06048,47.3184 6.0606,47.3185 6.06066,47.3185 6.06068,47.3185 6.06081,47.3186 6.06083,47.3186 6.06084,47.3186 6.06041,47.3184 6.06035,47.3184 6.06028,47.3184 6.06021,47.3184 6.06013,47.3184 6.05967,47.3185 6.05961,47.3185 6.05941,47.3184 6.05933,47.3183 6.0593,47.3183 6.05929,47.3182 6.05923,47.3181 6.05917,47.318 6.05912,47.3179 6.059,47.3178 6.05894,47.3178 6.05885,47.3177 6.05882,47.3177 6.05866,47.3174 6.05857,47.3171 6.05848,47.3167 6.05843,47.3165 6.05825,47.3162 6.05827,47.316 6.05826,47.3158 6.05826,47.3158 6.05825,47.3157 6.05823,47.3157 6.0582,47.3157 6.05816,47.3156 6.05789,47.3153 6.05785,47.3152 6.05762,47.315 6.05754,47.3149 6.05751,47.3148 6.0575,47.3147 6.05748,47.3145 6.05751,47.3144 6.05747,47.3143 6.05743,47.3142 6.05741,47.3141 6.0574,47.314 6.05734,47.3139 6.05732,47.3138 6.05727,47.3137 6.05721,47.3135 6.0571,47.3133 6.05707,47.3132 6.05705,47.3131 6.05703,47.3131 6.05693,47.3129 6.05695,47.3128 6.05695,47.3127 6.05692,47.3126 6.05691,47.3125 6.05689,47.3124 6.05686,47.3124 6.0568,47.3122 6.05674,47.3121 6.0567,47.3121 6.05666,47.312 6.05663,47.312 6.05659,47.312 6.05648,47.3118 6.05644,47.3117 6.05644,47.3117 6.05644,47.3115 6.05644,47.3115 6.05643,47.3115 6.05642,47.3114 6.05637,47.3112 6.05635,47.3112 6.05633,47.3111 6.05634,47.3111 6.05632,47.3109 6.05629,47.3109 6.05619,47.3107 6.05611,47.3106 6.05609,47.3106 6.05599,47.3103 6.05597,47.3102 6.0559,47.31 6.05583,47.3098 6.05574,47.3097 6.0557,47.3096 6.05569,47.3096 6.05563,47.3094 6.05556,47.3092 6.05545,47.3091 6.05538,47.3089 6.05527,47.3087 6.05523,47.3086 6.05518,47.3086 6.055,47.3083 6.05488,47.3082 6.05484,47.3082 6.05476,47.3081 6.05478,47.3081 6.05479,47.3081 6.05483,47.3081 6.05487,47.3082 6.0552,47.3083 6.05527,47.3083 6.05534,47.3083 6.05548,47.3084 6.05569,47.3085 6.05583,47.3086 6.05603,47.3086 6.05637,47.3087 6.05644,47.3087 6.05651,47.3087 6.05739,47.309 6.05757,47.309 6.05822,47.3092 6.05877,47.3094 6.05885,47.3094 6.05994,47.3098 6.06001,47.3099 6.06053,47.3101 6.06069,47.3102 6.06089,47.3103 6.06095,47.3104 6.06123,47.3106 6.06253,47.3112 6.06307,47.3115 6.06346,47.3117 6.06386,47.312 6.06438,47.3123 6.06481,47.3125 6.06491,47.3125 6.06548,47.3128 6.06577,47.3129 6.06668,47.3131 6.06721,47.3132 6.06782,47.3133 6.06813,47.3133 6.06819,47.3133 6.0684,47.3134 6.06889,47.3134 6.06989,47.3134 6.07041,47.3134 6.07056,47.3134 6.07086,47.3135 6.07177,47.3136 6.07265,47.3139 6.07298,47.314 6.07309,47.3141 6.07322,47.3141 6.07332,47.3141 6.07344,47.3141 6.07354,47.3141 6.07362,47.3141 6.07366,47.3141 6.07369,47.3141 6.07373,47.3141 6.07378,47.314 6.07388,47.3139 6.07393,47.3139 6.0743,47.3133 6.07434,47.3133 6.07436,47.3132 6.07436,47.3131 6.07434,47.313 6.07431,47.3129 6.07425,47.3128 6.07417,47.3127 6.07407,47.3126 6.07396,47.3125 6.0736,47.3123 6.07325,47.312 6.07294,47.3116 6.07283,47.3115 6.07242,47.3112 6.07215,47.3109 6.0721,47.3108 6.07206,47.3107 6.07204,47.3106 6.07201,47.3105 6.07191,47.3103 6.07185,47.3102 6.07175,47.31 6.07166,47.3099 6.07157,47.3098 6.0705,47.3089 6.07038,47.3088 6.07034,47.3087 6.07031,47.3087 6.07028,47.3086 6.07027,47.3086 6.07028,47.3086 6.07031,47.3085 6.07032,47.3085 6.07034,47.3086 6.07033,47.3086 6.07032,47.3086 6.0703,47.3086 6.07028,47.3086 6.07027,47.3086 6.07026,47.3085 6.07021,47.3085 6.07019,47.3085 6.07017,47.3085 6.07018,47.3085 6.0702,47.3086 6.07022,47.3086 6.07024,47.3085 6.07028,47.3086 6.0703,47.3086 6.07031,47.3085 6.07033,47.3085 6.07042,47.3085 6.07047,47.3085 6.07059,47.3084 6.0709,47.3083 6.07096,47.3083 6.07114,47.3081 6.07119,47.3081 6.07141,47.3078 6.07145,47.3078 6.07149,47.3077 6.07225,47.3069 6.07238,47.3066 6.0726,47.3062 6.07275,47.3059 6.07285,47.3056 6.07289,47.3056 6.07293,47.3055 6.07302,47.3055 6.0735,47.3051 6.07392,47.3049 6.07408,47.3047 6.07398,47.3046 6.07394,47.3046 6.07363,47.3046 6.07358,47.3046 6.07326,47.3047 6.07322,47.3047 6.07319,47.3047 6.07275,47.3047 6.07257,47.3047 6.07252,47.3047 6.07218,47.3047 6.07214,47.3047 6.07211,47.3047 6.07207,47.3047 6.07203,47.3046 6.07191,47.3045 6.07178,47.3044 6.07169,47.3043 6.07162,47.3042 6.07117,47.304 6.07114,47.304 6.07111,47.304 6.07101,47.304 6.07099,47.3039 6.0709,47.3039 6.07077,47.3039 6.07074,47.3039 6.07065,47.3038 6.07054,47.3038 6.07058,47.3038 6.07059,47.3038 6.07061,47.3039 6.07066,47.3039 6.07078,47.3039 6.0709,47.304 6.07099,47.3041 6.07104,47.3041 6.07112,47.3041 6.07113,47.3041 6.07114,47.3041 6.07115,47.3041 6.07123,47.3041 6.07144,47.3042 6.07144,47.3042 6.07146,47.3042 6.07149,47.3042 6.07155,47.3041 6.07154,47.304 6.07153,47.304 6.07153,47.304 6.07158,47.3038 6.07158,47.3036 6.07128,47.3035 6.07108,47.3034 6.07072,47.3033 6.07002,47.3029 6.06946,47.3027 6.06926,47.3026 6.0692,47.3026 6.06904,47.3025 6.06836,47.3023 6.06754,47.3019 6.06732,47.3019 6.06685,47.3017 6.0668,47.3016 6.06639,47.3015 6.06636,47.3015 6.06628,47.3015 6.06629,47.3015 6.0666,47.3012 6.06682,47.301 6.06692,47.3009 6.0671,47.3007 6.06738,47.3003 6.06758,47.3001 6.06758,47.3001 6.06764,47.3 6.06765,47.3 6.06768,47.3 6.06785,47.2998 6.06798,47.2997 6.06803,47.2997 6.06804,47.2996 6.06807,47.2996 6.06814,47.2995 6.06807,47.2995 6.06803,47.2994 6.06806,47.2994 6.06808,47.2995 6.06795,47.2994 6.06767,47.2992 6.06734,47.2989 6.0673,47.2988 6.06695,47.2985 6.06636,47.2981 6.06616,47.298 6.06567,47.2976 6.06564,47.2975 6.06548,47.2974 6.0651,47.2971 6.06503,47.2971 6.06496,47.297 6.06489,47.297 6.06483,47.297 6.06481,47.297 6.0648,47.297 6.06478,47.2969 6.06476,47.2969 6.06478,47.2969 6.06481,47.2969 6.06479,47.297 6.06476,47.297 6.0648,47.297 6.06453,47.2972 6.06397,47.2976 6.06391,47.2976 6.06357,47.2979 6.06341,47.298 6.06336,47.2981 6.06332,47.2981 6.0631,47.2983 6.06295,47.2984 6.06285,47.2984 6.06281,47.2985 6.06277,47.2985 6.06276,47.2985 6.06256,47.2985 6.06241,47.2986 6.06231,47.2986 6.06206,47.299 6.06202,47.2991 6.06193,47.2992 6.06171,47.2994 6.06169,47.2994 6.06161,47.2994 6.06147,47.2996 6.06122,47.2998 6.06115,47.2998 6.06106,47.3 6.06085,47.3002 6.06083,47.3002 6.06053,47.3004 6.06041,47.3004 6.06007,47.3001 6.05968,47.2998 6.05905,47.2993 6.05901,47.2993 6.05896,47.2992 6.05879,47.2991 6.05866,47.299 6.05849,47.2989 6.0578,47.2983 6.05764,47.2982 6.05756,47.2981 6.05686,47.2975 6.05663,47.2973 6.05627,47.297 6.05589,47.2968 6.05563,47.2966 6.05537,47.2963 6.05529,47.2963 6.05508,47.2961 6.05501,47.296 6.05476,47.2959 6.05473,47.2958 6.05452,47.2957 6.05437,47.2956 6.05408,47.2954 6.05395,47.2953 6.05388,47.2953 6.05363,47.2951 6.0536,47.2951 6.05359,47.295 6.05361,47.295 6.05365,47.2949 6.05369,47.2949 6.05375,47.2948 6.0538,47.2948 6.05386,47.2948 6.05387,47.2947 6.05387,47.2947 6.05386,47.2947 6.05386,47.2947 6.05407,47.2948 6.0541,47.2948 6.05413,47.2948 6.05415,47.2947 6.05415,47.2947 6.05415,47.2947 6.05415,47.2947 6.05414,47.2946 6.05413,47.2946 6.05406,47.2945 6.05405,47.2945 6.05401,47.2945 6.054,47.2945 6.05397,47.2945 6.0539,47.2945 6.05386,47.2945 6.05384,47.2945 6.05382,47.2945 6.05356,47.2945 6.05351,47.2945 6.05323,47.2944 6.05319,47.2944 6.053,47.2943 6.053,47.2943 6.05297,47.2943 6.05281,47.2942 6.0526,47.294 6.05251,47.2939 6.05273,47.2938 6.05312,47.2935 6.05365,47.2931 6.05396,47.2929 6.05418,47.2928 6.05439,47.2925 6.05461,47.2924 6.05478,47.2923 6.05498,47.2921 6.05522,47.2919 6.05537,47.2918 6.05553,47.2916 6.05582,47.2914 6.05607,47.2912 6.05614,47.2911 6.05674,47.2907 6.05682,47.2907 6.05733,47.2903 6.05749,47.2902 6.05781,47.2899 6.05788,47.2899 6.05789,47.2897 6.05772,47.2895 6.0577,47.2894 6.05764,47.2893 6.05747,47.289 6.05711,47.2886 6.05709,47.2885 6.05711,47.2884 6.05713,47.2884 6.05715,47.2883 6.0572,47.2882 6.05725,47.2881 6.0573,47.2881 6.05737,47.2881 6.05745,47.2881 6.05752,47.288 6.05798,47.2879 6.05802,47.2879 6.05803,47.2879 6.05815,47.2879 6.05836,47.2875 6.05841,47.2873 6.05846,47.2872 6.05848,47.2871 6.05852,47.2871 6.05855,47.287 6.05857,47.287 6.05859,47.287 6.05864,47.287 6.05902,47.2868 6.05937,47.2863 6.05955,47.2862 6.05959,47.2862 6.05962,47.2862 6.05966,47.2861 6.05969,47.2861 6.05992,47.286 6.05997,47.2859 6.05999,47.2859 6.06001,47.2859 6.06003,47.2859 6.06005,47.2859 6.06015,47.2858 6.06015,47.2858 6.05981,47.2854 6.05974,47.2854 6.05936,47.285 6.05915,47.2848 6.05912,47.2847 6.05908,47.2847 6.05905,47.2847 6.05899,47.2846 6.05869,47.2844 6.05856,47.2842 6.05845,47.2842 6.05838,47.2841 6.05835,47.2838 6.05797,47.2836 6.05758,47.2834 6.05748,47.2833 6.05725,47.2833 6.05718,47.2833 6.05718,47.2833 6.05721,47.2833 6.05706,47.2831 6.05708,47.2831 6.05715,47.283 6.0572,47.283 6.05726,47.283 6.05729,47.2829 6.05746,47.2828 6.0577,47.2826 6.05828,47.2823 6.05851,47.282 6.0587,47.2819 6.05866,47.2813 6.05854,47.2806 6.0585,47.2805 6.05846,47.2804 6.05841,47.2804 6.05836,47.2803 6.0583,47.2803 6.05802,47.2801 6.05774,47.2798 6.05771,47.2798 6.05753,47.2795 6.05745,47.2793 6.05743,47.2792 6.0574,47.279 6.05747,47.2786 6.05751,47.2785 6.05756,47.2785 6.05762,47.2784 6.05769,47.2784 6.05778,47.2784 6.05787,47.2784 6.05795,47.2783 6.05804,47.2783 6.05812,47.2784 6.05821,47.2784 6.05827,47.2784 6.05833,47.2784 6.05838,47.2785 6.05868,47.2787 6.05915,47.2791 6.05979,47.2795 6.05982,47.2795 6.05986,47.2795 6.06009,47.2795 6.06027,47.2795 6.0603,47.2795 6.06032,47.2796 6.06056,47.28 6.06062,47.28 6.0607,47.2801 6.06085,47.2802 6.06122,47.2805 6.06185,47.281 6.06296,47.2818 6.06407,47.2826 6.06475,47.2832 6.06481,47.2832 6.06539,47.2837 6.06569,47.284 6.06628,47.2847 6.06658,47.285 6.06671,47.2852 6.06672,47.2852 6.06692,47.2854 6.06719,47.2857 6.06746,47.2859 6.06749,47.2859 6.0675,47.2859 6.0675,47.286 6.0675,47.286 6.06789,47.2864 6.06821,47.2868 6.06856,47.2872 6.06881,47.2875 6.06908,47.2879 6.06939,47.2884 6.06977,47.289 6.07034,47.2899 6.07077,47.2905 6.07076,47.2905 6.07078,47.2905 6.0708,47.2906 6.07135,47.2912 6.07177,47.2917 6.07178,47.2917 6.07218,47.2921 6.0726,47.2926 6.07367,47.293 6.0742,47.2932 6.07424,47.2932 6.07428,47.2932 6.07432,47.2932 6.07437,47.2932 6.07509,47.2932 6.07513,47.2932 6.07527,47.2932 6.07511,47.2932 6.07499,47.2932 6.07482,47.2932 6.07432,47.2932 6.07427,47.2933 6.07427,47.2933 6.0743,47.2933 6.07525,47.294 6.07531,47.294 6.07669,47.2946 6.07769,47.295 6.07837,47.2955 6.07865,47.2957 6.07865,47.2957 6.07865,47.2957 6.07866,47.2957 6.07907,47.296 6.07985,47.2966 6.07995,47.2966 6.08005,47.2967 6.08034,47.2968 6.08051,47.2969 6.08058,47.2969 6.08064,47.2969 6.08069,47.2969 6.08073,47.2969 6.08119,47.2969 6.08141,47.2969 6.08143,47.2969 6.08144,47.2969 6.08146,47.2969 6.08147,47.2968 6.08148,47.2968 6.08174,47.2966 6.08199,47.2964 6.0822,47.296 6.08227,47.2959 6.08228,47.2959 6.08229,47.2958 6.08231,47.2957 6.08247,47.2954 6.08248,47.2954 6.08291,47.2952 6.08297,47.2951 6.08308,47.2951 6.08326,47.2948 6.08334,47.2945 6.08345,47.2941 6.08351,47.2939 6.08382,47.2935 6.08398,47.293 6.08386,47.2926 6.08383,47.2918 6.08427,47.2913 6.08437,47.2911 6.08439,47.291 6.08438,47.291 6.08428,47.2906 6.0842,47.2905 6.08419,47.2905 6.08413,47.2904 6.08408,47.2903 6.08401,47.2903 6.08384,47.2902 6.0838,47.2901 6.08377,47.2901 6.0837,47.29 6.08367,47.2899 6.08362,47.2898 6.08359,47.2897 6.08358,47.2897 6.08353,47.2896 6.08351,47.2895 6.08351,47.2895 6.08351,47.2895 6.08353,47.2893 6.08357,47.2893 6.08357,47.2891 6.0836,47.289 6.08355,47.2887 6.08351,47.2886 6.08351,47.2886 6.08351,47.2885 6.08353,47.2885 6.08355,47.2884 6.08359,47.2881 6.08358,47.2879 6.08354,47.2878 6.0835,47.2877 6.08317,47.2872 6.08294,47.2868 6.08264,47.2864 6.0825,47.2861 6.08225,47.2858 6.08196,47.2856 6.0818,47.2855 6.08176,47.2854 6.08134,47.2852 6.08128,47.2852 6.0811,47.285 6.08107,47.2849 6.08105,47.2849 6.08104,47.2846 6.08101,47.2846 6.08097,47.2845 6.08086,47.2843 6.08045,47.2839 6.08035,47.2839 6.08001,47.2837 6.07996,47.2837 6.07991,47.2837 6.07988,47.2837 6.07984,47.2837 6.07981,47.2837 6.07978,47.2837 6.07977,47.2838 6.07975,47.2838 6.0795,47.2839 6.07948,47.2839 6.07947,47.2839 6.07949,47.2838 6.07951,47.2838 6.07953,47.2838 6.07952,47.2838 6.07947,47.2838 6.0796,47.2837 6.07977,47.2838 6.07998,47.2841 6.08005,47.2841 6.08019,47.2841 ), {
            format: OpenLayers.Format,
                style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5},
                projection: new OpenLayers.Projection("EPSG:4326")
            });
            map.addLayer(gpx);

Cependant, j'ai une erreur : init is not define

init étant ma fonction gérant tous le bloc Openlayers.

Avez-vous une idée sur le pourquoi de cette erreur ?

Merci.

Dernière modification par heretik25 (Mon 06 February 2012 11:51)


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#4 Mon 06 February 2012 11:41

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

Suis pas sur que tu es vraiment utilisé mon code wink

Il y a un caractère "]" à la fin de ton code qui doit poser problème.

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#5 Mon 06 February 2012 11:49

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Yves a écrit:

Bonjour,

Suis pas sur que tu es vraiment utilisé mon code wink

Il y a un caractère "]" à la fin de ton code qui doit poser problème.

Y.


Bonjour et merci pour la réponse,

le "]" est un erreur de la balise ["code"] du forum, mon code n'a pas ce crochet.

Je n'utilise pas le code qui génère l'array en javascript car je le génère en PHP suite à une requête dynamique.

Dernière modification par heretik25 (Mon 06 February 2012 11:51)


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#6 Mon 06 February 2012 11:57

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Es tu sur que "OpenLayers.Geometry.Point(lat[i],lon[i]);" ne renvoie que '6.07952 47.2839' wink

D'ailleurs je pense que ton code est incorrecte : 6.07952,47.2839 6.07952,47.2839 => 6.07952 47.2839, 6.07952 47.2839

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#7 Mon 06 February 2012 12:01

Ludo
Participant assidu
Lieu: Messanges
Date d'inscription: 5 Sep 2005
Messages: 231
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Si tu passes par du php, pourquoi ne pas générer un webservice renvoyant un geojson de type "ligne",  directement utilisable par openlayers ?
Un tuto qui décrie ce genre de chose http://www.portailsig.org/content/carte … et-postgis

Dernière modification par Ludo (Mon 06 February 2012 12:01)

Hors ligne

 

#8 Mon 06 February 2012 12:09

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Enfaite, je prépare les données côté php. Faut-il que pour chaque couple x/y j’utilise OpenLayers.Geometry.Point(lat[i],lon[i]); ?

Pourrais-je le préparer côté php ?

Code:

while ($tab_select_coordonne = $sql_select_coordonne->fetch())
    {
        $coordonnees .= $tab_select_coordonne['coord_gps_lon'].' '.$tab_select_coordonne['coord_gps_lat'].', ';
    }

Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#9 Mon 06 February 2012 13:51

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

Je ne pense pas, plutôt :

Code:

while ($tab_select_coordonne = $sql_select_coordonne->fetch())
    {
        $coordonnees[]= 'new OpenLayers.Geometry.Point('.$tab_select_coordonne['coord_gps_lon'].', '.$tab_select_coordonne['coord_gps_lat'].')';
    }

Puis :

Code:

explode(',',$coordonnees);

Pour renvoyer le contenu sans avoir à traiter de "," à la fin de la chaîne de caractères.

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#10 Mon 06 February 2012 14:12

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Merci pour la proposition cependant l'explode n'explose rien puisqu'il ne trouve pas de virgule. Vous vouliez faire un explode comment ?


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#11 Mon 06 February 2012 14:18

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

C'est une erreur de ma part que je fais souvent : il fallait lire implode wink

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#12 Mon 06 February 2012 14:24

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

On se retrouve en code source avec :

Code:

            
            var gpx = new OpenLayers.Layer.LinearRing(OpenLayers.Geometry.Point(lat[i],lon[i]);new OpenLayers.Geometry.Point(6.07952, 47.2839),new OpenLayers.Geometry.Point(6.07952, 47.2839),new OpenLayers.Geometry.Point(6.07952, 47.2839),new OpenLayers.Geometry.Point(6.07952, 47.2839),new OpenLayers.Geometry.Point(6.07952, 47.2839),new OpenLayers.Geometry.Point(6.07952, 47.2839),new OpenLayers.Geometry.Point(6.07952, 47.2839),new OpenLayers.Geometry.Point(6.08125, 47.2853),new OpenLayers.Geometry.Point(6.08133, 47.2854),new OpenLayers.Geometry.Point(6.08162, 47.2857),new OpenLayers.Geometry.Point(6.08203, 47.2859),new OpenLayers.Geometry.Point(6.08235, 47.2861),new OpenLayers.Geometry.Point(6.08263, 47.2864),new OpenLayers.Geometry.Point(6.08282, 47.2867),new OpenLayers.Geometry.Point(6.08297, 47.287),new OpenLayers.Geometry.Point(6.08308, 47.2872),new OpenLayers.Geometry.Point(6.08345, 47.2874),new OpenLayers.Geometry.Point(6.08355, 47.2876),new OpenLayers.Geometry.Point(6.08376, 47.2878),new OpenLayers.Geometry.Point(6.08378, 47.288),new OpenLayers.Geometry.Point(6.08368, 47.2884),new OpenLayers.Geometry.Point(6.08364, 47.2886),new OpenLayers.Geometry.Point(6.08396, 47.2887),new OpenLayers.Geometry.Point(6.08399, 47.2886),new OpenLayers.Geometry.Point(6.08411, 47.2882),new OpenLayers.Geometry.Point(6.08414, 47.2879),new OpenLayers.Geometry.Point(6.08417, 47.2877),new OpenLayers.Geometry.Point(6.08413, 47.2876),new OpenLayers.Geometry.Point(6.08417, 47.2875),new OpenLayers.Geometry.Point(6.0842, 47.2875),new OpenLayers.Geometry.Point(6.08428, 47.2875),new OpenLayers.Geometry.Point(6.08438, 47.2875),new OpenLayers.Geometry.Point(6.08441, 47.2879),new OpenLayers.Geometry.Point(6.08444, 47.2881),new OpenLayers.Geometry.Point(6.08443, 47.2883),new OpenLayers.Geometry.Point(6.0844, 47.2884),new OpenLayers.Geometry.Point(6.08439, 47.2885),new OpenLayers.Geometry.Point(6.08432, 47.2886),new OpenLayers.Geometry.Point(6.08427, 47.2889),new OpenLayers.Geometry.Point(6.08429, 47.2889),new OpenLayers.Geometry.Point(6.08428, 47.2893),new OpenLayers.Geometry.Point(6.08426, 47.2893),new OpenLayers.Geometry.Point(6.08421, 47.2894),new OpenLayers.Geometry.Point(6.08402, 47.2894),new OpenLayers.Geometry.Point(6.08398, 47.2895),new OpenLayers.Geometry.Point(6.08384, 47.2895),new OpenLayers.Geometry.Point(6.08375, 47.2896),new OpenLayers.Geometry.Point(6.08372, 47.2896),new OpenLayers.Geometry.Point(6.08371, 47.2897),new OpenLayers.Geometry.Point(6.08373, 47.2899),new OpenLayers.Geometry.Point(6.08374, 47.29),new OpenLayers.Geometry.Point(6.0838, 47.2902),new OpenLayers.Geometry.Point(6.08388, 47.2903),new OpenLayers.Geometry.Point(6.08398, 47.2903),new OpenLayers.Geometry.Point(6.08401, 47.2904),new OpenLayers.Geometry.Point(6.08405, 47.2904),new OpenLayers.Geometry.Point(6.08405, 47.2905),new OpenLayers.Geometry.Point(6.08397, 47.2906),new OpenLayers.Geometry.Point(6.08384, 47.2906),new OpenLayers.Geometry.Point(6.08365, 47.2906),new OpenLayers.Geometry.Point(6.08353, 47.2906),new OpenLayers.Geometry.Point(6.08347, 47.2906),new OpenLayers.Geometry.Point(6.08339, 47.2906),new OpenLayers.Geometry.Point(6.08324, 47.2905),new OpenLayers.Geometry.Point(6.08318, 47.2905),new OpenLayers.Geometry.Point(6.08312, 47.2904),new OpenLayers.Geometry.Point(6.08304, 47.2903),new OpenLayers.Geometry.Point(6.083, 47.2903),new OpenLayers.Geometry.Point(6.08252, 47.29),new OpenLayers.Geometry.Point(6.0817, 47.2896),new OpenLayers.Geometry.Point(6.08112, 47.2894),new OpenLayers.Geometry.Point(6.08087, 47.2893),new OpenLayers.Geometry.Point(6.08053, 47.2892),new OpenLayers.Geometry.Point(6.08049, 47.2892),new OpenLayers.Geometry.Point(6.08045, 47.2892),new OpenLayers.Geometry.Point(6.07992, 47.2888),new OpenLayers.Geometry.Point(6.0799, 47.2888),new OpenLayers.Geometry.Point(6.07971, 47.2889),new OpenLayers.Geometry.Point(6.0796, 47.2889),new OpenLayers.Geometry.Point(6.07944, 47.289),new OpenLayers.Geometry.Point(6.07941, 47.2891),new OpenLayers.Geometry.Point(6.07914, 47.2893),new OpenLayers.Geometry.Point(6.07908, 47.2893),new OpenLayers.Geometry.Point(6.07873, 47.2896),new OpenLayers.Geometry.Point(6.0787, 47.2896),new OpenLayers.Geometry.Point(6.07864, 47.2896),new OpenLayers.Geometry.Point(6.0786, 47.2896),new OpenLayers.Geometry.Point(6.07847, 47.2897),new OpenLayers.Geometry.Point(6.07831, 47.2897),new OpenLayers.Geometry.Point(6.07825, 47.2898),new OpenLayers.Geometry.Point(6.07797, 47.2899),new OpenLayers.Geometry.Point(6.07788, 47.2899),new OpenLayers.Geometry.Point(6.07781, 47.2899),new OpenLayers.Geometry.Point(6.07774, 47.29),new OpenLayers.Geometry.Point(6.07769, 47.29),new OpenLayers.Geometry.Point(6.07763, 47.29),new OpenLayers.Geometry.Point(6.07718, 47.2903),new OpenLayers.Geometry.Point(6.07693, 47.2904),new OpenLayers.Geometry.Point(6.07641, 47.2902),new OpenLayers.Geometry.Point(6.07557, 47.2899),new OpenLayers.Geometry.Point(6.07506, 47.2899),new OpenLayers.Geometry.Point(6.07499, 47.2899),new OpenLayers.Geometry.Point(6.07468, 47.29),new OpenLayers.Geometry.Point(6.0746, 47.29),new OpenLayers.Geometry.Point(6.07399, 47.2903),new OpenLayers.Geometry.Point(6.0735, 47.2906),new OpenLayers.Geometry.Point(6.07298, 47.2909),new OpenLayers.Geometry.Point(6.07257, 47.291),new OpenLayers.Geometry.Point(6.07223, 47.2912),new OpenLayers.Geometry.Point(6.07196, 47.2913),new OpenLayers.Geometry.Point(6.07167, 47.2915),new OpenLayers.Geometry.Point(6.07163, 47.2915),new OpenLayers.Geometry.Point(6.07126, 47.2918),new OpenLayers.Geometry.Point(6.07118, 47.2918),new OpenLayers.Geometry.Point(6.07114, 47.2919),new OpenLayers.Geometry.Point(6.07107, 47.292),new OpenLayers.Geometry.Point(6.07079, 47.2922),new OpenLayers.Geometry.Point(6.07074, 47.2922),new OpenLayers.Geometry.Point(6.07072, 47.2922),new OpenLayers.Geometry.Point(6.07068, 47.2922),new OpenLayers.Geometry.Point(6.07033, 47.2925),new OpenLayers.Geometry.Point(6.07009, 47.2927),new OpenLayers.Geometry.Point(6.06997, 47.2928),new OpenLayers.Geometry.Point(6.06986, 47.2929),new OpenLayers.Geometry.Point(6.06962, 47.2932),new OpenLayers.Geometry.Point(6.06959, 47.2932),new OpenLayers.Geometry.Point(6.06934, 47.2934),new OpenLayers.Geometry.Point(6.06932, 47.2934),new OpenLayers.Geometry.Point(6.06913, 47.2936),new OpenLayers.Geometry.Point(6.06911, 47.2936),new OpenLayers.Geometry.Point(6.06889, 47.2937),new OpenLayers.Geometry.Point(6.06871, 47.2939),new OpenLayers.Geometry.Point(6.06866, 47.2939),new OpenLayers.Geometry.Point(6.0686, 47.294),new OpenLayers.Geometry.Point(6.06837, 47.2942),new OpenLayers.Geometry.Point(6.06834, 47.2942),new OpenLayers.Geometry.Point(6.06811, 47.2943),new OpenLayers.Geometry.Point(6.068, 47.2944),new OpenLayers.Geometry.Point(6.06796, 47.2945),new OpenLayers.Geometry.Point(6.06793, 47.2945),new OpenLayers.Geometry.Point(6.06787, 47.2945),new OpenLayers.Geometry.Point(6.06785, 47.2945),new OpenLayers.Geometry.Point(6.06785, 47.2945),new OpenLayers.Geometry.Point(6.06774, 47.2946),new OpenLayers.Geometry.Point(6.0675, 47.2948),new OpenLayers.Geometry.Point(6.06745, 47.2949),new OpenLayers.Geometry.Point(6.06736, 47.2949),new OpenLayers.Geometry.Point(6.06731, 47.295),new OpenLayers.Geometry.Point(6.06728, 47.295),new OpenLayers.Geometry.Point(6.06719, 47.2951),new OpenLayers.Geometry.Point(6.0671, 47.2952),new OpenLayers.Geometry.Point(6.06706, 47.2952),new OpenLayers.Geometry.Point(6.06693, 47.2954),new OpenLayers.Geometry.Point(6.06667, 47.2955),new OpenLayers.Geometry.Point(6.06657, 47.2955),new OpenLayers.Geometry.Point(6.06655, 47.2955),new OpenLayers.Geometry.Point(6.06649, 47.2956),new OpenLayers.Geometry.Point(6.06639, 47.2957),new OpenLayers.Geometry.Point(6.0662, 47.2958),new OpenLayers.Geometry.Point(6.06591, 47.2961),new OpenLayers.Geometry.Point(6.06584, 47.2961),new OpenLayers.Geometry.Point(6.06583, 47.2961),new OpenLayers.Geometry.Point(6.0658, 47.2962),new OpenLayers.Geometry.Point(6.06561, 47.2963),new OpenLayers.Geometry.Point(6.06555, 47.2963),new OpenLayers.Geometry.Point(6.06545, 47.2965),new OpenLayers.Geometry.Point(6.0653, 47.2965),new OpenLayers.Geometry.Point(6.06515, 47.2966),new OpenLayers.Geometry.Point(6.06489, 47.2968),new OpenLayers.Geometry.Point(6.06486, 47.2969),new OpenLayers.Geometry.Point(6.06481, 47.2969),new OpenLayers.Geometry.Point(6.06438, 47.2972),new OpenLayers.Geometry.Point(6.06404, 47.2975),new OpenLayers.Geometry.Point(6.06351, 47.2979),new OpenLayers.Geometry.Point(6.06294, 47.2984),new OpenLayers.Geometry.Point(6.06286, 47.2985),new OpenLayers.Geometry.Point(6.0627, 47.2985),new OpenLayers.Geometry.Point(6.06231, 47.2987),new OpenLayers.Geometry.Point(6.06221, 47.2987),new OpenLayers.Geometry.Point(6.06211, 47.2988),new OpenLayers.Geometry.Point(6.06211, 47.2988),new OpenLayers.Geometry.Point(6.06205, 47.299),new OpenLayers.Geometry.Point(6.06202, 47.2991),new OpenLayers.Geometry.Point(6.06196, 47.2991),new OpenLayers.Geometry.Point(6.06173, 47.2994),new OpenLayers.Geometry.Point(6.06167, 47.2995),new OpenLayers.Geometry.Point(6.06164, 47.2995),new OpenLayers.Geometry.Point(6.06162, 47.2995),new OpenLayers.Geometry.Point(6.06128, 47.2998),new OpenLayers.Geometry.Point(6.06124, 47.2998),new OpenLayers.Geometry.Point(6.06101, 47.3),new OpenLayers.Geometry.Point(6.06088, 47.3001),new OpenLayers.Geometry.Point(6.06087, 47.3001),new OpenLayers.Geometry.Point(6.0608, 47.3002),new OpenLayers.Geometry.Point(6.06076, 47.3002),new OpenLayers.Geometry.Point(6.06075, 47.3002),new OpenLayers.Geometry.Point(6.06069, 47.3003),new OpenLayers.Geometry.Point(6.06049, 47.3004),new OpenLayers.Geometry.Point(6.06043, 47.3005),new OpenLayers.Geometry.Point(6.06042, 47.3005),new OpenLayers.Geometry.Point(6.06039, 47.3005),new OpenLayers.Geometry.Point(6.06037, 47.3005),new OpenLayers.Geometry.Point(6.06036, 47.3005),new OpenLayers.Geometry.Point(6.06028, 47.3005),new OpenLayers.Geometry.Point(6.06027, 47.3005),new OpenLayers.Geometry.Point(6.06026, 47.3005),new OpenLayers.Geometry.Point(6.06019, 47.3004),new OpenLayers.Geometry.Point(6.06012, 47.3004),new OpenLayers.Geometry.Point(6.06005, 47.3003),new OpenLayers.Geometry.Point(6.06, 47.3003),new OpenLayers.Geometry.Point(6.05999, 47.3003),new OpenLayers.Geometry.Point(6.05965, 47.3),new OpenLayers.Geometry.Point(6.05929, 47.2996),new OpenLayers.Geometry.Point(6.05862, 47.2991),new OpenLayers.Geometry.Point(6.05803, 47.2986),new OpenLayers.Geometry.Point(6.05743, 47.2981),new OpenLayers.Geometry.Point(6.05727, 47.2979),new OpenLayers.Geometry.Point(6.0572, 47.2979),new OpenLayers.Geometry.Point(6.05703, 47.2977),new OpenLayers.Geometry.Point(6.05698, 47.2977),new OpenLayers.Geometry.Point(6.05676, 47.2975),new OpenLayers.Geometry.Point(6.0564, 47.2972),new OpenLayers.Geometry.Point(6.05614, 47.297),new OpenLayers.Geometry.Point(6.05579, 47.2967),new OpenLayers.Geometry.Point(6.05554, 47.2965),new OpenLayers.Geometry.Point(6.05528, 47.2963),new OpenLayers.Geometry.Point(6.05513, 47.2962),new OpenLayers.Geometry.Point(6.05509, 47.2961),new OpenLayers.Geometry.Point(6.05444, 47.2957),new OpenLayers.Geometry.Point(6.0542, 47.2956),new OpenLayers.Geometry.Point(6.05413, 47.2956),new OpenLayers.Geometry.Point(6.05389, 47.2955),new OpenLayers.Geometry.Point(6.05383, 47.2954),new OpenLayers.Geometry.Point(6.05371, 47.2953),new OpenLayers.Geometry.Point(6.05368, 47.2952),new OpenLayers.Geometry.Point(6.05366, 47.2952),new OpenLayers.Geometry.Point(6.05366, 47.2951),new OpenLayers.Geometry.Point(6.05367, 47.2951),new OpenLayers.Geometry.Point(6.0537, 47.295),new OpenLayers.Geometry.Point(6.05374, 47.295),new OpenLayers.Geometry.Point(6.05376, 47.2949),new OpenLayers.Geometry.Point(6.0538, 47.2949),new OpenLayers.Geometry.Point(6.05383, 47.2949),new OpenLayers.Geometry.Point(6.05402, 47.2948),new OpenLayers.Geometry.Point(6.05404, 47.2948),new OpenLayers.Geometry.Point(6.05409, 47.2948),new OpenLayers.Geometry.Point(6.05412, 47.2948),new OpenLayers.Geometry.Point(6.05416, 47.2948),new OpenLayers.Geometry.Point(6.0542, 47.2948),new OpenLayers.Geometry.Point(6.05424, 47.2948),new OpenLayers.Geometry.Point(6.05434, 47.2949),new OpenLayers.Geometry.Point(6.05437, 47.2948),new OpenLayers.Geometry.Point(6.05438, 47.2949),new OpenLayers.Geometry.Point(6.0547, 47.2951),new OpenLayers.Geometry.Point(6.05472, 47.2952),new OpenLayers.Geometry.Point(6.05473, 47.2952),new OpenLayers.Geometry.Point(6.05423, 47.2955),new OpenLayers.Geometry.Point(6.0541, 47.2956),new OpenLayers.Geometry.Point(6.05361, 47.2959),new OpenLayers.Geometry.Point(6.05323, 47.2962),new OpenLayers.Geometry.Point(6.05304, 47.2963),new OpenLayers.Geometry.Point(6.05293, 47.2965),new OpenLayers.Geometry.Point(6.05291, 47.2965),new OpenLayers.Geometry.Point(6.05291, 47.2965),new OpenLayers.Geometry.Point(6.0529, 47.2966),new OpenLayers.Geometry.Point(6.05256, 47.2969),new OpenLayers.Geometry.Point(6.05188, 47.2972),new OpenLayers.Geometry.Point(6.05125, 47.2973),new OpenLayers.Geometry.Point(6.0511, 47.2974),new OpenLayers.Geometry.Point(6.05106, 47.2974),new OpenLayers.Geometry.Point(6.05056, 47.2975),new OpenLayers.Geometry.Point(6.05053, 47.2975),new OpenLayers.Geometry.Point(6.05009, 47.2976),new OpenLayers.Geometry.Point(6.05006, 47.2976),new OpenLayers.Geometry.Point(6.05003, 47.2976),new OpenLayers.Geometry.Point(6.05001, 47.2976),new OpenLayers.Geometry.Point(6.04999, 47.2976),new OpenLayers.Geometry.Point(6.04998, 47.2976),new OpenLayers.Geometry.Point(6.04997, 47.2976),new OpenLayers.Geometry.Point(6.04982, 47.2975),new OpenLayers.Geometry.Point(6.0498, 47.2975),new OpenLayers.Geometry.Point(6.04971, 47.2975),new OpenLayers.Geometry.Point(6.04911, 47.2978),new OpenLayers.Geometry.Point(6.04898, 47.2981),new OpenLayers.Geometry.Point(6.04897, 47.2981),new OpenLayers.Geometry.Point(6.04896, 47.2981),new OpenLayers.Geometry.Point(6.04895, 47.2981),new OpenLayers.Geometry.Point(6.04859, 47.2983),new OpenLayers.Geometry.Point(6.04855, 47.2983),new OpenLayers.Geometry.Point(6.04788, 47.2984),new OpenLayers.Geometry.Point(6.04767, 47.2984),new OpenLayers.Geometry.Point(6.04731, 47.2985),new OpenLayers.Geometry.Point(6.04685, 47.2985),new OpenLayers.Geometry.Point(6.04641, 47.2986),new OpenLayers.Geometry.Point(6.04637, 47.2986),new OpenLayers.Geometry.Point(6.04635, 47.2986),new OpenLayers.Geometry.Point(6.04633, 47.2986),new OpenLayers.Geometry.Point(6.04609, 47.2987),new OpenLayers.Geometry.Point(6.04584, 47.2986),new OpenLayers.Geometry.Point(6.04511, 47.2986),new OpenLayers.Geometry.Point(6.04414, 47.2988),new OpenLayers.Geometry.Point(6.04373, 47.299),new OpenLayers.Geometry.Point(6.0435, 47.2992),new OpenLayers.Geometry.Point(6.0429, 47.2995),new OpenLayers.Geometry.Point(6.04246, 47.2998),new OpenLayers.Geometry.Point(6.04179, 47.3001),new OpenLayers.Geometry.Point(6.0417, 47.3002),new OpenLayers.Geometry.Point(6.04163, 47.3002),new OpenLayers.Geometry.Point(6.04158, 47.3003),new OpenLayers.Geometry.Point(6.04155, 47.3004),new OpenLayers.Geometry.Point(6.04153, 47.3004),new OpenLayers.Geometry.Point(6.04149, 47.3006),new OpenLayers.Geometry.Point(6.04147, 47.3006),new OpenLayers.Geometry.Point(6.04145, 47.3007),new OpenLayers.Geometry.Point(6.04116, 47.3011),new OpenLayers.Geometry.Point(6.04093, 47.3013),new OpenLayers.Geometry.Point(6.04071, 47.3015),new OpenLayers.Geometry.Point(6.04069, 47.3015),new OpenLayers.Geometry.Point(6.04067, 47.3015),new OpenLayers.Geometry.Point(6.04066, 47.3015),new OpenLayers.Geometry.Point(6.04065, 47.3016),new OpenLayers.Geometry.Point(6.04063, 47.3016),new OpenLayers.Geometry.Point(6.04061, 47.3016),new OpenLayers.Geometry.Point(6.04059, 47.3016),new OpenLayers.Geometry.Point(6.04057, 47.3016),new OpenLayers.Geometry.Point(6.04055, 47.3016),new OpenLayers.Geometry.Point(6.04053, 47.3016),new OpenLayers.Geometry.Point(6.0405, 47.3016),new OpenLayers.Geometry.Point(6.04048, 47.3016),new OpenLayers.Geometry.Point(6.04045, 47.3016),new OpenLayers.Geometry.Point(6.04043, 47.3016),new OpenLayers.Geometry.Point(6.0404, 47.3016),new OpenLayers.Geometry.Point(6.04035, 47.3016),new OpenLayers.Geometry.Point(6.0403, 47.3017),new OpenLayers.Geometry.Point(6.0402, 47.3017),new OpenLayers.Geometry.Point(6.04016, 47.3017),new OpenLayers.Geometry.Point(6.04014, 47.3017),new OpenLayers.Geometry.Point(6.04012, 47.3017),new OpenLayers.Geometry.Point(6.0401, 47.3017),new OpenLayers.Geometry.Point(6.04007, 47.3018),new OpenLayers.Geometry.Point(6.03966, 47.3018),new OpenLayers.Geometry.Point(6.03955, 47.3018),new OpenLayers.Geometry.Point(6.03953, 47.3018),new OpenLayers.Geometry.Point(6.03911, 47.3019),new OpenLayers.Geometry.Point(6.03886, 47.3019),new OpenLayers.Geometry.Point(6.03839, 47.302),new OpenLayers.Geometry.Point(6.03824, 47.302),new OpenLayers.Geometry.Point(6.03773, 47.3019),new OpenLayers.Geometry.Point(6.03692, 47.3019),new OpenLayers.Geometry.Point(6.03676, 47.3019),new OpenLayers.Geometry.Point(6.03588, 47.3016),new OpenLayers.Geometry.Point(6.03524, 47.3013),new OpenLayers.Geometry.Point(6.03471, 47.3008),new OpenLayers.Geometry.Point(6.03468, 47.3008),new OpenLayers.Geometry.Point(6.03459, 47.3007),new OpenLayers.Geometry.Point(6.03456, 47.3006),new OpenLayers.Geometry.Point(6.03439, 47.3004),new OpenLayers.Geometry.Point(6.0342, 47.3),new OpenLayers.Geometry.Point(6.03419, 47.2999),new OpenLayers.Geometry.Point(6.03403, 47.2993),new OpenLayers.Geometry.Point(6.03387, 47.299),new OpenLayers.Geometry.Point(6.03385, 47.2989),new OpenLayers.Geometry.Point(6.03355, 47.2983),new OpenLayers.Geometry.Point(6.03326, 47.2978),new OpenLayers.Geometry.Point(6.03278, 47.2973),new OpenLayers.Geometry.Point(6.03241, 47.2969),new OpenLayers.Geometry.Point(6.032, 47.2966),new OpenLayers.Geometry.Point(6.03135, 47.2964),new OpenLayers.Geometry.Point(6.03084, 47.2965),new OpenLayers.Geometry.Point(6.03083, 47.2965),new OpenLayers.Geometry.Point(6.03085, 47.2966),new OpenLayers.Geometry.Point(6.03088, 47.2966),new OpenLayers.Geometry.Point(6.03091, 47.2966),new OpenLayers.Geometry.Point(6.03094, 47.2967),new OpenLayers.Geometry.Point(6.03107, 47.2968),new OpenLayers.Geometry.Point(6.03111, 47.2968),new OpenLayers.Geometry.Point(6.03114, 47.2968),new OpenLayers.Geometry.Point(6.03142, 47.2974),new OpenLayers.Geometry.Point(6.03147, 47.2978),new OpenLayers.Geometry.Point(6.0314, 47.2981),new OpenLayers.Geometry.Point(6.03129, 47.2984),new OpenLayers.Geometry.Point(6.03128, 47.2984),new OpenLayers.Geometry.Point(6.03128, 47.2985),new OpenLayers.Geometry.Point(6.03112, 47.2988),new OpenLayers.Geometry.Point(6.03111, 47.2988),new OpenLayers.Geometry.Point(6.03111, 47.2988),new OpenLayers.Geometry.Point(6.03093, 47.2991),new OpenLayers.Geometry.Point(6.03088, 47.2992),new OpenLayers.Geometry.Point(6.03088, 47.2992),new OpenLayers.Geometry.Point(6.03077, 47.2995),new OpenLayers.Geometry.Point(6.03079, 47.2995),new OpenLayers.Geometry.Point(6.03077, 47.2995),new OpenLayers.Geometry.Point(6.03058, 47.3),new OpenLayers.Geometry.Point(6.0306, 47.3001),new OpenLayers.Geometry.Point(6.03061, 47.3001),new OpenLayers.Geometry.Point(6.03063, 47.3001),new OpenLayers.Geometry.Point(6.03064, 47.3001),new OpenLayers.Geometry.Point(6.03066, 47.3001),new OpenLayers.Geometry.Point(6.03069, 47.3001),new OpenLayers.Geometry.Point(6.0307, 47.3001),new OpenLayers.Geometry.Point(6.03093, 47.3002),new OpenLayers.Geometry.Point(6.03111, 47.3003),new OpenLayers.Geometry.Point(6.03114, 47.3003),new OpenLayers.Geometry.Point(6.03116, 47.3004),new OpenLayers.Geometry.Point(6.03141, 47.3006),new OpenLayers.Geometry.Point(6.0315, 47.3007),new OpenLayers.Geometry.Point(6.03151, 47.3008),new OpenLayers.Geometry.Point(6.03152, 47.3008),new OpenLayers.Geometry.Point(6.03151, 47.3008),new OpenLayers.Geometry.Point(6.03151, 47.3008),new OpenLayers.Geometry.Point(6.03152, 47.3009),new OpenLayers.Geometry.Point(6.03153, 47.3009),new OpenLayers.Geometry.Point(6.0315, 47.3012),new OpenLayers.Geometry.Point(6.03143, 47.3015),new OpenLayers.Geometry.Point(6.03144, 47.3015),new OpenLayers.Geometry.Point(6.03143, 47.3016),new OpenLayers.Geometry.Point(6.03142, 47.3016),new OpenLayers.Geometry.Point(6.03142, 47.302),new OpenLayers.Geometry.Point(6.03179, 47.3024),new OpenLayers.Geometry.Point(6.03196, 47.3026),new OpenLayers.Geometry.Point(6.03205, 47.3027),new OpenLayers.Geometry.Point(6.03224, 47.3029),new OpenLayers.Geometry.Point(6.03239, 47.303),new OpenLayers.Geometry.Point(6.03266, 47.3033),new OpenLayers.Geometry.Point(6.03283, 47.3034),new OpenLayers.Geometry.Point(6.03315, 47.3037),new OpenLayers.Geometry.Point(6.03348, 47.3039),new OpenLayers.Geometry.Point(6.03378, 47.3041),new OpenLayers.Geometry.Point(6.0338, 47.3041),new OpenLayers.Geometry.Point(6.03381, 47.3041),new OpenLayers.Geometry.Point(6.03383, 47.3041),new OpenLayers.Geometry.Point(6.03386, 47.3041),new OpenLayers.Geometry.Point(6.03398, 47.3041),new OpenLayers.Geometry.Point(6.03403, 47.3042),new OpenLayers.Geometry.Point(6.03415, 47.3044),new OpenLayers.Geometry.Point(6.03411, 47.3045),new OpenLayers.Geometry.Point(6.03408, 47.3045),new OpenLayers.Geometry.Point(6.03407, 47.3045),new OpenLayers.Geometry.Point(6.03403, 47.3045),new OpenLayers.Geometry.Point(6.03401, 47.3044),new OpenLayers.Geometry.Point(6.03393, 47.3044),new OpenLayers.Geometry.Point(6.03387, 47.3044),new OpenLayers.Geometry.Point(6.03349, 47.3042),new OpenLayers.Geometry.Point(6.03312, 47.3041),new OpenLayers.Geometry.Point(6.0331, 47.3041),new OpenLayers.Geometry.Point(6.03278, 47.304),new OpenLayers.Geometry.Point(6.03266, 47.304),new OpenLayers.Geometry.Point(6.03258, 47.304),new OpenLayers.Geometry.Point(6.03255, 47.304),new OpenLayers.Geometry.Point(6.03251, 47.304),new OpenLayers.Geometry.Point(6.03231, 47.304),new OpenLayers.Geometry.Point(6.03204, 47.3039),new OpenLayers.Geometry.Point(6.03139, 47.3037),new OpenLayers.Geometry.Point(6.03113, 47.3037),new OpenLayers.Geometry.Point(6.0311, 47.3037),new OpenLayers.Geometry.Point(6.03085, 47.3037),new OpenLayers.Geometry.Point(6.03083, 47.3038),new OpenLayers.Geometry.Point(6.03083, 47.3038),new OpenLayers.Geometry.Point(6.03083, 47.3038),new OpenLayers.Geometry.Point(6.03083, 47.3038),new OpenLayers.Geometry.Point(6.03083, 47.3038),new OpenLayers.Geometry.Point(6.03083, 47.3038),new OpenLayers.Geometry.Point(6.03085, 47.3038),new OpenLayers.Geometry.Point(6.03135, 47.304),new OpenLayers.Geometry.Point(6.03143, 47.304),new OpenLayers.Geometry.Point(6.03151, 47.3041),new OpenLayers.Geometry.Point(6.03214, 47.3043),new OpenLayers.Geometry.Point(6.03254, 47.3046),new OpenLayers.Geometry.Point(6.03253, 47.3046),new OpenLayers.Geometry.Point(6.0325, 47.3046),new OpenLayers.Geometry.Point(6.03247, 47.3046),new OpenLayers.Geometry.Point(6.03244, 47.3046),new OpenLayers.Geometry.Point(6.03242, 47.3046),new OpenLayers.Geometry.Point(6.03239, 47.3046),new OpenLayers.Geometry.Point(6.03237, 47.3046),new OpenLayers.Geometry.Point(6.03234, 47.3046),new OpenLayers.Geometry.Point(6.03233, 47.3046),new OpenLayers.Geometry.Point(6.03231, 47.3046),new OpenLayers.Geometry.Point(6.03175, 47.3044),new OpenLayers.Geometry.Point(6.03133, 47.3043),new OpenLayers.Geometry.Point(6.03098, 47.3042),new OpenLayers.Geometry.Point(6.03051, 47.304),new OpenLayers.Geometry.Point(6.03017, 47.304),new OpenLayers.Geometry.Point(6.03015, 47.304),new OpenLayers.Geometry.Point(6.03013, 47.304),new OpenLayers.Geometry.Point(6.03011, 47.304),new OpenLayers.Geometry.Point(6.03009, 47.304),new OpenLayers.Geometry.Point(6.03008, 47.304),new OpenLayers.Geometry.Point(6.03032, 47.3043),new OpenLayers.Geometry.Point(6.0307, 47.3045),new OpenLayers.Geometry.Point(6.03106, 47.3048),new OpenLayers.Geometry.Point(6.03145, 47.3051),new OpenLayers.Geometry.Point(6.03187, 47.3055),new OpenLayers.Geometry.Point(6.03218, 47.3057),new OpenLayers.Geometry.Point(6.03244, 47.3058),new OpenLayers.Geometry.Point(6.03276, 47.3059),new OpenLayers.Geometry.Point(6.03279, 47.3059),new OpenLayers.Geometry.Point(6.0331, 47.306),new OpenLayers.Geometry.Point(6.03313, 47.306),new OpenLayers.Geometry.Point(6.03315, 47.3061),new OpenLayers.Geometry.Point(6.03328, 47.3061),new OpenLayers.Geometry.Point(6.0333, 47.3061),new OpenLayers.Geometry.Point(6.03337, 47.3062),new OpenLayers.Geometry.Point(6.03379, 47.3064),new OpenLayers.Geometry.Point(6.0338, 47.3064),new OpenLayers.Geometry.Point(6.03382, 47.3064),new OpenLayers.Geometry.Point(6.03384, 47.3064),new OpenLayers.Geometry.Point(6.03386, 47.3064),new OpenLayers.Geometry.Point(6.03401, 47.3065),new OpenLayers.Geometry.Point(6.03403, 47.3065),new OpenLayers.Geometry.Point(6.03443, 47.3066),new OpenLayers.Geometry.Point(6.03489, 47.3068),new OpenLayers.Geometry.Point(6.03534, 47.307),new OpenLayers.Geometry.Point(6.03571, 47.3072),new OpenLayers.Geometry.Point(6.03572, 47.3072),new OpenLayers.Geometry.Point(6.03575, 47.3072),new OpenLayers.Geometry.Point(6.03623, 47.3074),new OpenLayers.Geometry.Point(6.03667, 47.3076),new OpenLayers.Geometry.Point(6.03711, 47.3077),new OpenLayers.Geometry.Point(6.03712, 47.3077),new OpenLayers.Geometry.Point(6.03754, 47.3078),new OpenLayers.Geometry.Point(6.03768, 47.3079),new OpenLayers.Geometry.Point(6.0377, 47.3079),new OpenLayers.Geometry.Point(6.03809, 47.308),new OpenLayers.Geometry.Point(6.0385, 47.308),new OpenLayers.Geometry.Point(6.03852, 47.308),new OpenLayers.Geometry.Point(6.03854, 47.308),new OpenLayers.Geometry.Point(6.03861, 47.308),new OpenLayers.Geometry.Point(6.03863, 47.308),new OpenLayers.Geometry.Point(6.03909, 47.3081),new OpenLayers.Geometry.Point(6.03924, 47.3081),new OpenLayers.Geometry.Point(6.03926, 47.3081),new OpenLayers.Geometry.Point(6.03966, 47.3081),new OpenLayers.Geometry.Point(6.0397, 47.3081),new OpenLayers.Geometry.Point(6.03972, 47.3081),new OpenLayers.Geometry.Point(6.03976, 47.3081),new OpenLayers.Geometry.Point(6.03978, 47.3081),new OpenLayers.Geometry.Point(6.03981, 47.3081),new OpenLayers.Geometry.Point(6.03984, 47.3081),new OpenLayers.Geometry.Point(6.04008, 47.3081),new OpenLayers.Geometry.Point(6.04023, 47.3081),new OpenLayers.Geometry.Point(6.04025, 47.3081),new OpenLayers.Geometry.Point(6.04092, 47.3081),new OpenLayers.Geometry.Point(6.04079, 47.3084),new OpenLayers.Geometry.Point(6.04058, 47.3084),new OpenLayers.Geometry.Point(6.04056, 47.3084),new OpenLayers.Geometry.Point(6.04053, 47.3084),new OpenLayers.Geometry.Point(6.04048, 47.3084),new OpenLayers.Geometry.Point(6.04045, 47.3084),new OpenLayers.Geometry.Point(6.04042, 47.3084),new OpenLayers.Geometry.Point(6.03996, 47.3084),new OpenLayers.Geometry.Point(6.03984, 47.3084),new OpenLayers.Geometry.Point(6.03951, 47.3084),new OpenLayers.Geometry.Point(6.03936, 47.3085),new OpenLayers.Geometry.Point(6.03909, 47.3085),new OpenLayers.Geometry.Point(6.03905, 47.3085),new OpenLayers.Geometry.Point(6.03902, 47.3085),new OpenLayers.Geometry.Point(6.03883, 47.3086),new OpenLayers.Geometry.Point(6.03877, 47.3086),new OpenLayers.Geometry.Point(6.03875, 47.3086),new OpenLayers.Geometry.Point(6.03872, 47.3086),new OpenLayers.Geometry.Point(6.03869, 47.3086),new OpenLayers.Geometry.Point(6.03867, 47.3086),new OpenLayers.Geometry.Point(6.03853, 47.3086),new OpenLayers.Geometry.Point(6.03851, 47.3086),new OpenLayers.Geometry.Point(6.03849, 47.3087),new OpenLayers.Geometry.Point(6.03841, 47.3087),new OpenLayers.Geometry.Point(6.03839, 47.3087),new OpenLayers.Geometry.Point(6.03837, 47.3087),new OpenLayers.Geometry.Point(6.03835, 47.3087),new OpenLayers.Geometry.Point(6.03833, 47.3087),new OpenLayers.Geometry.Point(6.03827, 47.3087),new OpenLayers.Geometry.Point(6.0382, 47.3087),new OpenLayers.Geometry.Point(6.03818, 47.3087),new OpenLayers.Geometry.Point(6.03766, 47.3088),new OpenLayers.Geometry.Point(6.03746, 47.3089),new OpenLayers.Geometry.Point(6.03743, 47.3089),new OpenLayers.Geometry.Point(6.03737, 47.3089),new OpenLayers.Geometry.Point(6.03732, 47.3089),new OpenLayers.Geometry.Point(6.0373, 47.3089),new OpenLayers.Geometry.Point(6.03714, 47.3089),new OpenLayers.Geometry.Point(6.03712, 47.3089),new OpenLayers.Geometry.Point(6.03675, 47.3091),new OpenLayers.Geometry.Point(6.03673, 47.3091),new OpenLayers.Geometry.Point(6.0363, 47.3091),new OpenLayers.Geometry.Point(6.03625, 47.3092),new OpenLayers.Geometry.Point(6.0361, 47.3093),new OpenLayers.Geometry.Point(6.03612, 47.3095),new OpenLayers.Geometry.Point(6.03619, 47.3095),new OpenLayers.Geometry.Point(6.03621, 47.3095),new OpenLayers.Geometry.Point(6.03623, 47.3095),new OpenLayers.Geometry.Point(6.03662, 47.3097),new OpenLayers.Geometry.Point(6.03667, 47.3097),new OpenLayers.Geometry.Point(6.0367, 47.3097),new OpenLayers.Geometry.Point(6.03672, 47.3097),new OpenLayers.Geometry.Point(6.03719, 47.3096),new OpenLayers.Geometry.Point(6.03722, 47.3096),new OpenLayers.Geometry.Point(6.03724, 47.3096),new OpenLayers.Geometry.Point(6.03748, 47.3095),new OpenLayers.Geometry.Point(6.03802, 47.3095),new OpenLayers.Geometry.Point(6.0386, 47.3094),new OpenLayers.Geometry.Point(6.03872, 47.3094),new OpenLayers.Geometry.Point(6.03895, 47.3094),new OpenLayers.Geometry.Point(6.03899, 47.3094),new OpenLayers.Geometry.Point(6.0395, 47.3094),new OpenLayers.Geometry.Point(6.03978, 47.3093),new OpenLayers.Geometry.Point(6.03992, 47.3094),new OpenLayers.Geometry.Point(6.04093, 47.3092),new OpenLayers.Geometry.Point(6.04177, 47.3092),new OpenLayers.Geometry.Point(6.04252, 47.3094),new OpenLayers.Geometry.Point(6.04299, 47.3095),new OpenLayers.Geometry.Point(6.04314, 47.3095),new OpenLayers.Geometry.Point(6.04317, 47.3095),new OpenLayers.Geometry.Point(6.0432, 47.3095),new OpenLayers.Geometry.Point(6.04377, 47.3097),new OpenLayers.Geometry.Point(6.04437, 47.31),new OpenLayers.Geometry.Point(6.04492, 47.3103),new OpenLayers.Geometry.Point(6.04551, 47.3106),new OpenLayers.Geometry.Point(6.04553, 47.3107),new OpenLayers.Geometry.Point(6.04557, 47.3107),new OpenLayers.Geometry.Point(6.04628, 47.311),new OpenLayers.Geometry.Point(6.04706, 47.3113),new OpenLayers.Geometry.Point(6.04719, 47.3113),new OpenLayers.Geometry.Point(6.04725, 47.3113),new OpenLayers.Geometry.Point(6.04726, 47.3113),new OpenLayers.Geometry.Point(6.04728, 47.3114),new OpenLayers.Geometry.Point(6.0473, 47.3114),new OpenLayers.Geometry.Point(6.04732, 47.3114),new OpenLayers.Geometry.Point(6.04735, 47.3114),new OpenLayers.Geometry.Point(6.04827, 47.3117),new OpenLayers.Geometry.Point(6.04955, 47.3121),new OpenLayers.Geometry.Point(6.05018, 47.3123),new OpenLayers.Geometry.Point(6.0503, 47.3124),new OpenLayers.Geometry.Point(6.05033, 47.3124),new OpenLayers.Geometry.Point(6.05087, 47.3126),new OpenLayers.Geometry.Point(6.05158, 47.3129),new OpenLayers.Geometry.Point(6.05215, 47.3132),new OpenLayers.Geometry.Point(6.05231, 47.3133),new OpenLayers.Geometry.Point(6.05233, 47.3133),new OpenLayers.Geometry.Point(6.05253, 47.3134),new OpenLayers.Geometry.Point(6.05258, 47.3135),new OpenLayers.Geometry.Point(6.05299, 47.3137),new OpenLayers.Geometry.Point(6.05326, 47.3139),new OpenLayers.Geometry.Point(6.05327, 47.3139),new OpenLayers.Geometry.Point(6.05355, 47.3141),new OpenLayers.Geometry.Point(6.05356, 47.3142),new OpenLayers.Geometry.Point(6.05371, 47.3143),new OpenLayers.Geometry.Point(6.05373, 47.3143),new OpenLayers.Geometry.Point(6.05375, 47.3143),new OpenLayers.Geometry.Point(6.05398, 47.3145),new OpenLayers.Geometry.Point(6.05401, 47.3145),new OpenLayers.Geometry.Point(6.05405, 47.3146),new OpenLayers.Geometry.Point(6.05429, 47.3148),new OpenLayers.Geometry.Point(6.05431, 47.3148),new OpenLayers.Geometry.Point(6.0545, 47.3149),new OpenLayers.Geometry.Point(6.05472, 47.3151),new OpenLayers.Geometry.Point(6.05501, 47.3153),new OpenLayers.Geometry.Point(6.05526, 47.3155),new OpenLayers.Geometry.Point(6.05546, 47.3157),new OpenLayers.Geometry.Point(6.05567, 47.3159),new OpenLayers.Geometry.Point(6.05581, 47.316),new OpenLayers.Geometry.Point(6.05582, 47.3161),new OpenLayers.Geometry.Point(6.05584, 47.3161),new OpenLayers.Geometry.Point(6.05616, 47.3163),new OpenLayers.Geometry.Point(6.0566, 47.3166),new OpenLayers.Geometry.Point(6.05702, 47.3168),new OpenLayers.Geometry.Point(6.05725, 47.3169),new OpenLayers.Geometry.Point(6.05768, 47.3171),new OpenLayers.Geometry.Point(6.05776, 47.3171),new OpenLayers.Geometry.Point(6.05779, 47.3171),new OpenLayers.Geometry.Point(6.05781, 47.3171),new OpenLayers.Geometry.Point(6.05795, 47.3172),new OpenLayers.Geometry.Point(6.05804, 47.3172),new OpenLayers.Geometry.Point(6.05846, 47.3174),new OpenLayers.Geometry.Point(6.05865, 47.3176),new OpenLayers.Geometry.Point(6.05866, 47.3176),new OpenLayers.Geometry.Point(6.05868, 47.3176),new OpenLayers.Geometry.Point(6.05869, 47.3176),new OpenLayers.Geometry.Point(6.05871, 47.3176),new OpenLayers.Geometry.Point(6.05872, 47.3176),new OpenLayers.Geometry.Point(6.05874, 47.3176),new OpenLayers.Geometry.Point(6.05896, 47.3179),new OpenLayers.Geometry.Point(6.05908, 47.3181),new OpenLayers.Geometry.Point(6.05925, 47.3183),new OpenLayers.Geometry.Point(6.05957, 47.3184),new OpenLayers.Geometry.Point(6.05964, 47.3185),new OpenLayers.Geometry.Point(6.05973, 47.3187),new OpenLayers.Geometry.Point(6.05969, 47.3188),new OpenLayers.Geometry.Point(6.05967, 47.3188),new OpenLayers.Geometry.Point(6.05958, 47.3189),new OpenLayers.Geometry.Point(6.0597, 47.319),new OpenLayers.Geometry.Point(6.05974, 47.319),new OpenLayers.Geometry.Point(6.05977, 47.3188),new OpenLayers.Geometry.Point(6.05973, 47.3188),new OpenLayers.Geometry.Point(6.05965, 47.3189),new OpenLayers.Geometry.Point(6.05979, 47.319),new OpenLayers.Geometry.Point(6.05988, 47.3191),new OpenLayers.Geometry.Point(6.05968, 47.3189),new OpenLayers.Geometry.Point(6.05969, 47.3189),new OpenLayers.Geometry.Point(6.05972, 47.3189),new OpenLayers.Geometry.Point(6.05975, 47.2939),new OpenLayers.Geometry.Point(6.08382, 47.2935),new OpenLayers.Geometry.Point(6.08398, 47.293),new OpenLayers.Geometry.Point(6.08386, 47.2926),new OpenLayers.Geometry.Point(6.08383, 47.2918),new OpenLayers.Geometry.Point(6.08427, 47.2913),new OpenLayers.Geometry.Point(6.08437, 47.2911),new OpenLayers.Geometry.Point(6.08439, 47.291),new OpenLayers.Geometry.Point(6.08438, 47.291),new OpenLayers.Geometry.Point(6.08428, 47.2906),new OpenLayers.Geometry.Point(6.0842, 47.2905),new OpenLayers.Geometry.Point(6.08419, 47.2905),new OpenLayers.Geometry.Point(6.08413, 47.2904),new OpenLayers.Geometry.Point(6.08408, 47.2903),new OpenLayers.Geometry.Point(6.08401, 47.2903),new OpenLayers.Geometry.Point(6.08384, 47.2902),new OpenLayers.Geometry.Point(6.0838, 47.2901),new OpenLayers.Geometry.Point(6.08377, 47.2901),new OpenLayers.Geometry.Point(6.0837, 47.29),new OpenLayers.Geometry.Point(6.08367, 47.2899),new OpenLayers.Geometry.Point(6.08362, 47.2898),new OpenLayers.Geometry.Point(6.08359, 47.2897),new OpenLayers.Geometry.Point(6.08358, 47.2897),new OpenLayers.Geometry.Point(6.08353, 47.2896),new OpenLayers.Geometry.Point(6.08351, 47.2895),new OpenLayers.Geometry.Point(6.08351, 47.2895),new OpenLayers.Geometry.Point(6.08351, 47.2895),new OpenLayers.Geometry.Point(6.08353, 47.2893),new OpenLayers.Geometry.Point(6.08357, 47.2893),new OpenLayers.Geometry.Point(6.08357, 47.2891),new OpenLayers.Geometry.Point(6.0836, 47.289),new OpenLayers.Geometry.Point(6.08355, 47.2887),new OpenLayers.Geometry.Point(6.08351, 47.2886),new OpenLayers.Geometry.Point(6.08351, 47.2886),new OpenLayers.Geometry.Point(6.08351, 47.2885),new OpenLayers.Geometry.Point(6.08353, 47.2885),new OpenLayers.Geometry.Point(6.08355, 47.2884),new OpenLayers.Geometry.Point(6.08359, 47.2881),new OpenLayers.Geometry.Point(6.08358, 47.2879),new OpenLayers.Geometry.Point(6.08354, 47.2878),new OpenLayers.Geometry.Point(6.0835, 47.2877),new OpenLayers.Geometry.Point(6.08317, 47.2872),new OpenLayers.Geometry.Point(6.08294, 47.2868),new OpenLayers.Geometry.Point(6.08264, 47.2864),new OpenLayers.Geometry.Point(6.0825, 47.2861),new OpenLayers.Geometry.Point(6.08225, 47.2858),new OpenLayers.Geometry.Point(6.08196, 47.2856),new OpenLayers.Geometry.Point(6.0818, 47.2855),new OpenLayers.Geometry.Point(6.08176, 47.2854),new OpenLayers.Geometry.Point(6.08134, 47.2852),new OpenLayers.Geometry.Point(6.08128, 47.2852),new OpenLayers.Geometry.Point(6.0811, 47.285),new OpenLayers.Geometry.Point(6.08107, 47.2849),new OpenLayers.Geometry.Point(6.08105, 47.2849),new OpenLayers.Geometry.Point(6.08104, 47.2846),new OpenLayers.Geometry.Point(6.08101, 47.2846),new OpenLayers.Geometry.Point(6.08097, 47.2845),new OpenLayers.Geometry.Point(6.08086, 47.2843),new OpenLayers.Geometry.Point(6.08045, 47.2839),new OpenLayers.Geometry.Point(6.08035, 47.2839),new OpenLayers.Geometry.Point(6.08001, 47.2837),new OpenLayers.Geometry.Point(6.07996, 47.2837),new OpenLayers.Geometry.Point(6.07991, 47.2837),new OpenLayers.Geometry.Point(6.07988, 47.2837),new OpenLayers.Geometry.Point(6.07984, 47.2837),new OpenLayers.Geometry.Point(6.07981, 47.2837),new OpenLayers.Geometry.Point(6.07978, 47.2837),new OpenLayers.Geometry.Point(6.07977, 47.2838),new OpenLayers.Geometry.Point(6.07975, 47.2838),new OpenLayers.Geometry.Point(6.0795, 47.2839),new OpenLayers.Geometry.Point(6.07948, 47.2839),new OpenLayers.Geometry.Point(6.07947, 47.2839),new OpenLayers.Geometry.Point(6.07949, 47.2838),new OpenLayers.Geometry.Point(6.07951, 47.2838),new OpenLayers.Geometry.Point(6.07953, 47.2838),new OpenLayers.Geometry.Point(6.07952, 47.2838),new OpenLayers.Geometry.Point(6.07947, 47.2838),new OpenLayers.Geometry.Point(6.0796, 47.2837),new OpenLayers.Geometry.Point(6.07977, 47.2838),new OpenLayers.Geometry.Point(6.07998, 47.2841),new OpenLayers.Geometry.Point(6.08005, 47.2841),new OpenLayers.Geometry.Point(6.08019, 47.2841)), {
            format: OpenLayers.Format,
            style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5},
            projection: new OpenLayers.Projection("EPSG:4326")
            });
            map.addLayer(gpx);

Mais l'erreur persiste, init is not define


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#13 Mon 06 February 2012 15:11

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

var gpx = new OpenLayers.Layer.LinearRing([new OpenLayers.Geometry.P[...] ], {
           format: OpenLayers.Format,
            style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5},
            projection: new OpenLayers.Projection("EPSG:4326")
            });
            map.addLayer(gpx);


autrement dit : supprimer la ")" à la fin de la liste des géométries et la remplacer par un "]" et rajouter un "[" au début

Y.
PS : j'ai modifié mon code originel


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#14 Mon 06 February 2012 15:48

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Comme ceci : ?

Code:

var gpx = new OpenLayers.Layer.LinearRing([new OpenLayers.Geometry.Point[<?php echo implode(',',$coordonnees); ?>] ], {
           format: OpenLayers.Format,
            style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5},
            projection: new OpenLayers.Projection("EPSG:4326")
            });
            map.addLayer(gpx);

Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#15 Mon 06 February 2012 16:28

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

non plutôt :

Code:

var gpx = new OpenLayers.Layer.LinearRing([<?php echo implode(',',$coordonnees); ?>] , {
           format: OpenLayers.Format,
            style: {strokeColor: "red", strokeWidth: 5, strokeOpacity: 0.5},
            projection: new OpenLayers.Projection("EPSG:4326")
            });
            map.addLayer(gpx);

Avec echo implode(',',$coordonnees); qui renvoie New OpenLayers.Geometry.Point(lat[i],lon[i]);new OpenLayers.Geometry.Point(6.07952, 47.2839), ...

Y.


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#16 Mon 06 February 2012 16:45

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Ok merci pour votre patience,

Me voilà par-contre avec l'erreur

Code:

Erreur : OpenLayers.Layer.LinearRing is not a constructor

Dernière modification par heretik25 (Mon 06 February 2012 16:45)


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#17 Mon 06 February 2012 17:15

Yves
Membre du bureau
Lieu: Aix-les-Bains
Date d'inscription: 22 Mar 2006
Messages: 9869
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

J'ai pas trop fait attention mais OpenLayers.Layer.LinearRing n'existe pas en effet, par contre :

http://dev.openlayers.org/releases/Open … ng-js.html

si tu remplaces par la bonne méthode il faudra que tu te crées une couche vector et que tu y rajoutes ces géométries via la méthode addFeatures :

http://dev.openlayers.org/releases/Open … ddFeatures

qui prend comme argument un vectorFeature :

http://dev.openlayers.org/releases/Open … ure.Vector

qui prend bien une géométrie en argument.

Y.
PS : renvoyer un geojson en mode ajax est certainement plus facile wink


Yves Jacolin, bénévole de l'association GeoRezo.net, agit au nom et pour le compte de l'association - Partageons ce qui nous départage !!  - GeoRezo vous aide ? Aidez GeoRezo !

Hors ligne

 

#18 Tue 07 February 2012 08:45

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

Si cela est plus simple en ajax, pouvez-vous m'expliquer la démarche ?

Merci !


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#19 Wed 08 February 2012 09:23

Ludo
Participant assidu
Lieu: Messanges
Date d'inscription: 5 Sep 2005
Messages: 231
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Tu peux regarder le lien que j'ai donné plus haut
Sinon perso j'utilise ce genre de chose côté openlayers :
Bien sur ça ne marche que si le service web associé renvoie correctement un geojson (pour cela voir le lien que j'ai mis plus haut et le code associé au service web en php)
J'espère ne rien avoir oublié, j'ai fais un copier coller rapide.

Code:

var request = OpenLayers.Request.POST({
    url: url_test, //variable représentant l'url du webservice qui renvoie un geojson
    data:xml_test, //variable contenant les paramètres, si on envoie des paramètres sous la forme d'un fichier xml
    headers: {
    "Content-Type": "text/xml"
    },
    callback: handler
})

function handler(request) {
    if(!request.responseXML) {
        //le style pour la couche
        var styleLayer = new OpenLayers.StyleMap(OpenLayers.Util.applyDefaults(
            {pointRadius:4, fillColor: couleurCouche, fillOpacity: 0.7, strokeColor: "black"},
            OpenLayers.Feature.Vector.style["default"]));
        //On récupère le geojson
        var featurecollection = request.responseText;
        var geojson_format = new OpenLayers.Format.GeoJSON();
        //On crée une nouvelle couche
        var vector_layer = new OpenLayers.Layer.Vector("test",{displayInLayerSwitcher:false,styleMap: styleLayer}); 
        map.addLayer(vector_layer);
        //On ajoute les entités à la couche
        vector_layer.addFeatures(geojson_format.read(featurecollection));
    }
}

Dernière modification par Ludo (Wed 08 February 2012 09:26)

Hors ligne

 

#20 Wed 08 February 2012 15:51

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Créer un service web pour diffuser mes données ? Est-ce envisageable à partir d'un hébergement mutualisé ?


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#21 Wed 08 February 2012 15:59

Ludo
Participant assidu
Lieu: Messanges
Date d'inscription: 5 Sep 2005
Messages: 231
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Tu as bien un page php qui te renvoie des données ? ton "service web" c'est ça, as tu regardé le script php dans le lien que je t'ai mis plus haut ?

Hors ligne

 

#22 Thu 09 February 2012 08:54

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Ludo a écrit:

Tu as bien un page php qui te renvoie des données ? ton "service web" c'est ça, as tu regardé le script php dans le lien que je t'ai mis plus haut ?


J'ai regardé le code proposé. l'objectif est donc de faire un geojson en php. Je vais essayer de construire quelque chose à partir de l'exemple et reviendrai sûrement pour demander de l'aide.

Merci.


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#23 Thu 09 February 2012 09:22

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

Est-ce que la préparation du geojson vous paraît bonne ?

Code:

//Génération de la chaîne GeoJSON
    $str = '';
    $str .= '{
    "type": "FeatureCollection",
    "features": [';
    while ($tab_select_coordonne = $sql_select_coordonne->fetch()) 
    {
        $str .= '{
            "geometry": {
                "type": "LineString",
                "coordinates": ['.$tab_select_coordonne['coord_gps_lon'].','.$tab_select_coordonne['coord_gps_lat'].']
            },
        },';
    }
    $str .= ']}';
    echo $str;

Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#24 Thu 09 February 2012 10:05

Ludo
Participant assidu
Lieu: Messanges
Date d'inscription: 5 Sep 2005
Messages: 231
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Qu'écrit la page ? (donne le résultat écrit par la page php)
Tu verras bien plus facilement si tu as le bon résultat, tu peux même en faire une copie, l'enregistrer et l'ouvrir dans qgis (ou même directement mettre l'url dans qgis)
Ceci dit je suis pas sur que ton code écrive les coordonnées correctement là mais à vérifier

Dernière modification par Ludo (Thu 09 February 2012 10:06)

Hors ligne

 

#25 Thu 09 February 2012 10:27

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Voici l'echo du résultat sur 100 points


Code:

{ "type": "FeatureCollection", "features": [{ "geometry": { "type": "LineString", "coordinates": [6.07952,47.2839] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07952,47.2839] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07952,47.2839] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07952,47.2839] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07952,47.2839] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07952,47.2839] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07952,47.2839] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08125,47.2853] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08133,47.2854] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08162,47.2857] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08203,47.2859] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08235,47.2861] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08263,47.2864] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08282,47.2867] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08297,47.287] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08308,47.2872] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08345,47.2874] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08355,47.2876] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08376,47.2878] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08378,47.288] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08368,47.2884] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08364,47.2886] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08396,47.2887] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08399,47.2886] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08411,47.2882] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08414,47.2879] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08417,47.2877] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08413,47.2876] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08417,47.2875] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0842,47.2875] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08428,47.2875] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08438,47.2875] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08441,47.2879] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08444,47.2881] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08443,47.2883] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0844,47.2884] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08439,47.2885] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08432,47.2886] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08427,47.2889] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08429,47.2889] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08428,47.2893] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08426,47.2893] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08421,47.2894] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08402,47.2894] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08398,47.2895] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08384,47.2895] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08375,47.2896] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08372,47.2896] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08371,47.2897] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08373,47.2899] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08374,47.29] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0838,47.2902] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08388,47.2903] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08398,47.2903] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08401,47.2904] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08405,47.2904] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08405,47.2905] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08397,47.2906] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08384,47.2906] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08365,47.2906] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08353,47.2906] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08347,47.2906] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08339,47.2906] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08324,47.2905] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08318,47.2905] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08312,47.2904] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08304,47.2903] }, },{ "geometry": { "type": "LineString", "coordinates": [6.083,47.2903] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08252,47.29] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0817,47.2896] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08112,47.2894] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08087,47.2893] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08053,47.2892] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08049,47.2892] }, },{ "geometry": { "type": "LineString", "coordinates": [6.08045,47.2892] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07992,47.2888] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0799,47.2888] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07971,47.2889] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0796,47.2889] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07944,47.289] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07941,47.2891] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07914,47.2893] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07908,47.2893] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07873,47.2896] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0787,47.2896] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07864,47.2896] }, },{ "geometry": { "type": "LineString", "coordinates": [6.0786,47.2896] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07847,47.2897] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07831,47.2897] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07825,47.2898] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07797,47.2899] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07788,47.2899] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07781,47.2899] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07774,47.29] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07769,47.29] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07763,47.29] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07718,47.2903] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07693,47.2904] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07641,47.2902] }, },{ "geometry": { "type": "LineString", "coordinates": [6.07557,47.2899] }, },]}

Vous semble t-il juste ?

Qgis, n'arrive pas à me l'ouvrir.


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#26 Thu 09 February 2012 11:07

Ludo
Participant assidu
Lieu: Messanges
Date d'inscription: 5 Sep 2005
Messages: 231
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Non
Regarde les spécifications du geojson

Code:

{ "type": "LineString",
  "coordinates": [ [100.0, 0.0], [101.0, 1.0] ]
  }

Issue de http://geojson.org/geojson-spec.html#id3

Hors ligne

 

#27 Thu 09 February 2012 11:54

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Il manque les crochets, c'est ça ?


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#28 Tue 21 February 2012 09:42

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

up svp :-)


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#29 Tue 13 March 2012 16:25

Loic_GR
Moderateur
Lieu: Besancon
Date d'inscription: 12 May 2011
Messages: 1024
Site web

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,

En essayant ceci

Code:

    //Génération de la chaîne GeoJSON
    $str = '';
    $str .= '{
    "type": "Feature",
      "geometry": {
        "type": "LineString",
        "coordinates": [';
              
    while ($tab_select_coordonne = $sql_select_coordonne->fetch()) 
    {
        if($total_retour == 1)
        {
            $virgule = '';
        }
        else
        {
            $virgule = ',';
        }
        
        $str .='['.$tab_select_coordonne['coord_gps_lon'].','.$tab_select_coordonne['coord_gps_lat'].']'.$virgule;
        $total_retour--;
    }
    $str .= ']}}';
    
    echo $str;

J'ai apparemment un code plus logique mais si je donne l'url à QGIS, j'ai une erreur.

Par avance, merci pour votre aide.


Freelance traitements ETL FME certifié: www.sitdi-france.fr Twitter : @sitdifrance
Site perso ~ www.partir-en-vtt.com

Hors ligne

 

#30 Wed 14 March 2012 08:33

Cornet Jérémie
Participant assidu
Lieu: Nouméa
Date d'inscription: 6 Apr 2008
Messages: 229

Re: [Openlayers] Créer une polyligne à partir de données X/Y

Bonjour,
Personnellement, pour générer du json (ou du geojson), j'utilise un tableau associatif emboité qui a la même structure que le json.
Quand le tableau est prêt, la fonction json_encode($mon_tableau) finit le travail.

PS : peux tu donner un exemple de fichier geojson généré par ton code ?

Dernière modification par Cornet Jérémie (Wed 14 March 2012 09:09)

Hors ligne

 

Pied de page des forums

Powered by FluxBB