EncodedPolyline an map

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

EncodedPolyline an map

Jonas Plass
Hello,
i am very new to osm and openlayers and i like it =)
But i got a problem when trying to display an encodedPolyline on my map .....
I try something like follow.
 
 
            routeLayer = new OpenLayers.Layer.Vector("Route");
            map.addLayer(routeLayer);
     
            var element = dataProvider.encodedRouteTrack; // this is my encodedString
            var format = new OpenLayers.Format.EncodedPolyline();
            var features = format.read(element);
            if(features) {
                if(features.constructor != Array) {
                    features = [features];
                }
            }
           
            routeLayer.addFeatures(features);
    }
 
Could somesome help?
best regards BigJo

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users