[OpenLayers-Users] link with gps

matthew.white at accenture.com matthew.white at accenture.com
Thu Jun 26 10:29:30 EDT 2008


One variation to the steps Kenneth provided which you may also want to
consider is to use a Java applet to read the NMEA data from the COM port
connected to the GPS. You'll need to deal with the applet permissions,
so depending on your intended user base this may or may not be an issue.
Since applets can integrate with Java Script it makes setting the center
point on the map straightforward when new position data is read from the
GPS. We've done this on a past project (pre-OL) and it worked out well.

 

Regards,

Matt

________________________________

From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
On Behalf Of Kenneth Skovhede, GEOGRAF A/S
Sent: Thursday, June 26, 2008 9:46 AM
To: Didrik Pinte
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] link with gps

 

Its fairly easy.

These are the steps:

1. Set up OL map (I assume you have this)
2. Read data from GPS
3. call map.setCenter with the GPS data

Step 2 varies, depending on the GPS brand.
Usually you can tweak the device to put out NMEA compliant data on a COM
port. 
NMEA is human readable, and specs can be found online.

Step 3 may cause trouble, because you have to interact with a javascript
inside a page.
On way is to simply host the page in an application, ie. a .Net form,
then the access is there.

Another way is to create a webservice / micro webserver that returns the
current position.
A javascript inside the page can then poll the position (via AJAX), and
update the center.

You may run into trouble if your map is projected into something thats
not Lat/Lon compatible.
In that case, take a look at the Proj.4 library, avalible for both
javascript and regular programming.



Regards, Kenneth Skovhede, GEOGRAF A/S



Didrik Pinte skrev: 

Hi,
 
One of my client asked me if it was possible to control the center of an
openlayer map by an external GPS connected to it's laptop ... 
 
I have googled a bit about this but found nothing.
 
Does anybody have an interesting suggestion ? link ? idea ?
 
Thanks
 
Didrik
  
 



________________________________



 
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
  


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/25bd2d0f/attachment.html


More information about the Users mailing list