Franson - GPS in Browser

Franson produce something to centre an OpenStreetMap but is there a way to show your position as a lat/long or as a marker? The data is available from the Franson software on http://localhost:12175. You can do this with GoogleMaps but I was hoping for the same solution here.

Does anybody have some information on this subject?

Thanks

What is Franson?

Is this thread what you want: addingcurrent position marker on openstreetmap.org

Thanks for the reply. How do you add this code to openstreetmap?

Thanks

Thanks for the reply. How do you add this code to openstreetmap?

I am looking to get a dynamic position marker.

www.franson.com

Thanks

More info - this is what I want to do. Does OSM support this or is it planned?

http://mehere.glenmurphy.com/

This provides a centred map with a location marker in Google Maps.

Yes, you can do any kind of mashup like the thousands of Google mashups with OpenStreetMap and OpenLayers. There are some examples here: http://wiki.openstreetmap.org/wiki/OpenLayers

Thanks for your reply. There does not seem to be one like MeHere which puts a marker on the map by reading a particular port output from the Franson GPSGate software. It would be useful to have a location pointer with a lat long position displayed.

The source code for MeHere is available, so it shouldn’t be too hard to make it work with OSM instead of Google Maps.
And it says on that page “Adding other formats is very easy, so feel free to ask.” Though it looks like its not been updated for years, so I don’t know if the developer is still working on it.

Also it says"http://localhost:7305/js will give you the coordinates and status as javascript variables". It should be possible to modify one of the OpenLayers examples to read the coordinates from there.

Thanks for the reply

http://localhost:7305/js gives this info on screen:

var mh_status = 1;
var mh_coord = {long: -0.545945, lat: 51.2428616667};

The static marker code is:

// Start position for the map (hardcoded here for simplicity, // but maybe you want to get from URL params) var lat=50.0 var lon=10.0 var zoom=16 Is there a method of reading this from the port and getting it to refresh every five seconds or so?

Sure there is, but I doubt anyone is going to make a working script for you. You have to try out things for yourself as well… :slight_smile:

You are looking for a javascript timer function in which you read the coordinates, convert them to the internal OL coordinates (look at OL projections), create a new marker with the coordinates and add it to OL using addMarker().