OpenStreetMap API HTML Serial GPS/IP GPS

Hello guys,

Anybody have a clue how i can get my real position on openstreetmap html api ?
Im using a serial GPS ttyUSB0 , i cannot find anywhere an exemple of this, just with geolocation from ip…

Thank you.

Can you provide more detail about what end-result you’re trying to reach? The OSM API won’t have any idea where you are, so I’m not sure how helpful it would be. Are you wanting to display your current position overlaid on top of an OSM-based map?

https://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example There is an example of how to put a marker at a specific latitude and longitude.

https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi?view=all E.g., you can avail NMEA sentences from a AdaFruit GPS module on a RaspberryPI.

http://aprs.gids.nl/nmea/ The latitude and longitude can be availed from the CPGGA or GPRMC NMEA sentences.

So, yes, I have a clue.

Hello guys,

Thanks for all your info, i will explain in more details what i want to do.
The goal is to create a simple html page, with openlayers or openstreetmaps where i can show my actual position from a usb serial GPS or from a GSP with Socket IP.
I managed to do this with google maps… with some node code and html witch i found on github ( https://github.com/infusion/GPS.js )
That example from there is working fine, but i could not find a way to use openlayers insted of google maps.
It will be nice if someone have an example working with openstreetmaps and a real gps receiver, i will be thankful :slight_smile:

Hmm nobody have a exemple with openstreetmap geolocation with real GPS ? :frowning:

I’d have thought that normally you’d tell the OS that the attached GPS was a location source, have the browser pick up location and use HTML5 location in JS to detect where the user is?