GPS Data with HTML - javascript

I'm working in a project where I have to collect data from a GPS Module (NMEA data) and pass it to an html application so I can display exact location of the device on a Google map. I have created the map using the google maps api but I'm unsure of how to pass the NMEA data through my application. What would be the most efficient way to do this? Thank you.

If you use Google's My Maps (this is a very easy method to get your own map in your own HTML page) you can import GPX data straight into the map. You just need to convert your NMEA data to GPX.
If you're comfortable with the command line GPSBabel looks relatively simple to use (there are a couple of GUIs available if needed). Alternatively, OpenStreetMap has some other alternative methods that you can try.

Related

QGIS - Creating a map that uses live data

I am very new to qgis and qgis server, which I have downloaded the plugins of Openlayers, and qgis2web with qgis 2.18. As an added note, I have a wordpress site which the map will go into. I have created a map with multiple layers. Hooked up database's data to it to populate what midwest state counties people had went to, who had went to those counties, and how many times they have been to that county. Even colored coded it to show case results. Now I am ready to put the map on the web. Here is my Question: How do you put the map on the web so it will show live data from our database we are using?
I have create a map using qgis2web and exporting it and then use place it within my wordpress's wamp server and was able to display it using an iframe. BUT, I assume it only created that one static instance of the map. If the datbase were to update, it will not show the correct mapping results. In so, I want to keep the map constantly connected to the database so it will show live data. How would I show live data and having the map constantly update? I think I have downloaded the qgis server as well, and hopefully set that up correctly. Was thinking of doing that way as well, but no luck. Any help where to start, or what to do is appreciated.
You might want to consider using Rethinkdb. It pushes JSON to your apps in real time. https://github.com/rethinkdb/rethinkdb
When you export a map using qgis2web it will export your layers as a static files. Using the latest version (2.22.0) it goes into the "data" folder and will create a .js file with the geographic information stored as a geojson (https://en.wikipedia.org/wiki/GeoJSON). Now for a feed with live data this will definitely not work.
To achieve a live feed there are a number of ways to build one. There are certain services like Qgis Cloud (https://qgiscloud.com/) or Carto (http://carto.com/) that allow you to do that. However, these service might not necessarily suit your needs. (In Carto's case only the base functionality is free of charge. The features for building a live feed cost.)
If you want to build it yourself I'm not aware of a "simple solution". There are quite a few different ways to build a web GIS. In short you'd need your geodatabase (like postgres with postgis), a map server software (like geoserver) that renders the geographic information in the database as WMS/WFS services that in return can be visualised using Openlayers, Leaflet or other javascript libraries. The resulting map can be implemented on your site (Some CMS come with plugins that ease the process of implementing mapping services. I don't know about wordpress though).
In any case, it is probably best to just refer to already existing answers and tutorials:
https://gis.stackexchange.com/questions/8113/how-to-start-web-mapping

Use Google My Maps Polygons in my API

Here is what I would like to achieve :
I have a Google My Maps map, with a few polygons over a city, representing districts.
On the server side of my application, I would like to create a tool that, when given a position, can return me the polygon it is into.
Is it even possible ?
Maybe My Maps is not the good service, if so, I am totally open to work with something else.
One option is to use the geoxml3 kmz branch with a binary proxy to access the .kmz data from Google MyMaps, that will render your data as native Google Maps Javascript API objects. Then you can use point in polygon tests to determine which polygon your input point is in.
Point in polygon example (using another third party library, a version of epoly, ported to the Google Maps Javascript API v3).
Example rendering MyMaps output using the kmz branch of geoxml3
(Note: I couldn't make your data work, there were character encoding issues that made the KML invalid).

Converting XML Polygons into Google Maps

I have a XML (KMZ) file with polygons that refer to geographical areas, like counties and states, and I want to be able to read this data into googlemaps.
I'm thinking it can be done more conveniently for me in 2 ways:
a) Parsing the xml file into inserts into a Oracle Database
b) Reading the xml directly from my google maps page using Javascript. (Data would be placed in arrays, I presume).
Either way, does anyone have some tips on how to do this efficiently?
Maybe someone made a great part of the code needed to do this already.
Thanks
Maybe try the google maps API v3, https://developers.google.com/maps/documentation/javascript/layers#KMLLayers
Regards, Lea.

Is it possible to get building data from Google Maps?

Is it possible to manipulate or duplicate the building data (landscape.man_made) for Google Maps? I've been Googling about building data, but not really turning anything up. I'd like to be able to enhance the existing map to add live shadows (for example). Thanks in advance, obie
Unfortunately it's not possible to access the raw data behind the Maps API.

Google Maps WebService API - show directions result on map

EDIT:
How is it possible to get a DirectionsResult json object from Google maps Web Service APIv3 without breaking the "laws" of xss?
if so, how is it possible to parse that result and show it on a map (in the js API I use DirectionsRenderer) ?
I can do the above with the js API, but am failing miserably with the Web Service. also, use of JQuery / JQM is available.
Any ideas?
Sounds like you don't actually want to execute Javascript, you just want to parse JSON. There are many libraries available to do this.
I recommend you to use Javascript OpenLayers Library displaying map data including Google Maps in most modern web browsers, with no server-side dependencies and Vaadin's OpenLayers Wrapper which contains server side wrapper component for OpenLayers Maps.
Check out some of the applications that were built using these tools:
http://trac.osgeo.org/openlayers/wiki/Gallery

Categories

Resources