You are not logged in.

#1 2008-05-27 06:39:25

Sanjiv Kumar
Member
Registered: 2008-05-22
Posts: 4

Problem to set map in centre

I want to use OSM in my project.
After display OSM and pointer on particular area. I need to call that function on particular time refresh so that
pointer(image) could change according to new lat,lon which comming from database. But when call this function browser scroll bar increase automaticaly on every refresh rate. and also pointer don't set on given lat,lon.
Also I need to draw line on map so that user can see the route line.
Plz tell me from where I can get these functions and how to use them.

Offline

#2 2008-05-27 08:09:54

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Problem to set map in centre

Could you show us an example, show us you page and code... And if you have questions on how to use openlayers, I'm sure there are a lot more experienced people over at openlayers.org.

# Mailing Lists: http://openlayers.org/mailman/listinfo
# IRC: irc://irc.freenode.net/#openlayers

Offline

#3 2008-05-27 14:15:42

Lambertus
Administrator
From: Apeldoorn (NL)
Registered: 2007-03-17
Posts: 3,269
Website

Re: Problem to set map in centre

Drawing a line on the map using OpenLayers can be done with vectors. Another way is to render a transparent image on the server containing the line and load that into the client.

To load new data in OpenLayers periodically (e.g. to update your current GPS position) can be done using JavaScript timers.

I suggest you take a look a the OpenLayers example and pick one that comes close to your needs to start with.


Mapping tools: Garmin GPSmap 60CSx, Giant Terrago 2002

Offline

#4 2008-05-28 06:27:27

Sanjiv Kumar
Member
Registered: 2008-05-22
Posts: 4

Re: Problem to set map in centre

Problem to set map in centre I solved.
Next problem is that I want to draw line according to array of latitude,longitude.
So that I can show vehicle route e.g vehicle on which road going.

Offline

#5 2008-05-28 12:44:33

emj
Member
From: .se (59.3N17.99E) 0735969076
Registered: 2006-06-18
Posts: 949

Re: Problem to set map in centre

Here is an example using  open layers to dynamically view OSM database contents.
http://crschmidt.dev.openstreetmap.org/ … ers=B0FTTT

It's very well done.

Offline

Board footer

Powered by FluxBB