[OpenLayers-Users] draw a line on a map?
geoman
csabbey at gmail.com
Tue Apr 15 15:23:49 EDT 2008
There were other issues with my code - I tried to start with an out of date
example of pgRouting from
http://pgrouting.postlbs.org/wiki/Workshop-DrawRoute
Here is a page which details some other changes that are necessary to get
this code to work against version 2.5
http://tainavn.blogspot.com/
Christopher Schmidt-4 wrote:
>
> On Mon, Apr 14, 2008 at 01:14:52PM -0700, geoman wrote:
>>
>> I'm new to OpenLayers; I'm evaluating it for a current project. I'm going
>> to
>> be getting WKT for road segments from a database, and I want to highlight
>> those segments on a map. However, I haven't been able to get past this
>> error:
>> Error: uncaught exception: [Exception... "String contains an invalid
>> character" code: "5" nsresult: "0x80530005
>> (NS_ERROR_DOM_INVALID_CHARACTER_ERR)" location:
>> "http://openlayers.org/api/OpenLayers.js Line: 554"]
>
> The WKT format returns Features, not geometries.
>
>> var wkt = "LINESTRING(-73.9444 40.75921,-73.96892 40.76396)";
>> var geometry = parser.read(wkt);
>> var feature = new OpenLayers.Feature.Vector(geometry);
>
> Should just be:
>
>> var wkt = "LINESTRING(-73.9444 40.75921,-73.96892 40.76396)";
>> var feature = parser.read(wkt);
>
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://www.nabble.com/draw-a-line-on-a-map--tp16689097p16705780.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list