I need to generate a GIS map showing some points and polygons. This map generation process has to run in the background so that every day at a certain time of the day a map is made and stored at a certain location in the file system.
I don't think leaflet can be used for this as it runs on the browser.
Not sure how will this happen in QGIS also....any light in this direction will be helpful.
My requirement is to generate a HTML report which contains a map. I cannot do it on the browser because the user will not use the browser and want the report to be inn his mailbox every day automatically.
I will be using node js to generate HTML.
How can this be achieved? Please save my life.
Thanks
I suggest you use something like phantom.js to perform what is essentially a screen capture of the map you generate in a web page that is 'displayed' on a headless, off-screen web page. What sort of map server you use to generate the maps is up to you; but that would let you capture a browser view of the map and re-package it in a PDF or an image that is embedded in an email.
Make that PDF or image a GeoPDF or a GeoTIFF or example and the result would retain some geospatial aspects instead of being a dumb screen capture.
I would use something capable of delivering a map tiling service (like wms) which you can then query server-side and piece together the tiles. I've had good luck with geoserver (http://geoserver.org/) but there are other solutions as well. I'm not sure if you can can query Google maps api or Open Street Map like this. The nice thing about your own map server is that you can completely define the map you want on it in one place. Aside from this, I would browse the npm repository to see if anyone has tackled this problem before.
Related
I have Call Detailed Records(CDR) data which in its raw form has timestamp, latitude and longitude. I have summarized this data to show where a user was on a particular day. What I have now are three fields: Begin(Date),End(Date) and Lat/Lon. Worth noting is that intervals are irregular and Lat/Lon can repeat. My objective is to have a visualization/animation with the following capabilities. Adjustable speed when viewing time so that I can see when a user returns to the same place. It should look something like this or this. I have searched endlessly and cant seem to find pointers to resources for use in Google maps or similar platforms. Now I have a kml file for each user but when I view it in Google Earth, the effects are not what I'm looking for. Problems include speed,its too fast and for some reason I cant control the start date of the animation. Any help will be appreciated.
CanvasLayer.js Library is what you have to integrate with your app code in order to get the sort of animated data on your Map. This library integrates Google Maps and Web GL behind the scenes and you just have to basic code for initialization and add path of your text/kml file, Rest of the things are automated.
Please follow this link to know about the code implementation and also some sample examples.
Hope this would Help!!
I have a node.js web application which makes use of google maps. I want to enable a user to save the map they are viewing in a pdf document. I'll use pdfKit to generate the pdf document as it has support for images but for this, I'll first need to save the image of the map. I don't know how I'll go about this. Can anyone give me some ideas on how to do this - how do I save an image of the map a user is looking at on the server?
I believe you would have to get the image file through Google Static Maps API, generate PDF and return the document to the user.
I would also take #Dr.Molle's comment into consideration if you plan to actually store the images in a database.
I'm interested in adding a Google Maps feature to a program I'm writing. I would start with a historic GPS log file containing a record of my changing GPS location and date/time - for example as I drive along the road. Later on I would like to feed this log file into a windows program which would display the GPS position as a marker in the center of a Google Map that is displayed in a window on screen. The Google Map would be automatically scrolled horizontally or vertically in historic "real time" as the GPS position changed so that the marker always stays in the center of the map.
Below is a YouTube video of an existing program which already does exactly what I want, so it must be possible (it's the pane in the bottom right of the video frame)
http://www.youtube.com/watch?feature=player_embedded&v=r4rwMV7hhaY#at=840
Effectively the user would be playing-back their recorded movements in real-time from days or months ago. It would not be for tracking current movements.
I don't know much about the Google API yet, but I think that the Google maps would have to be running in a desktop program, and not on a web site.
Are there any pre-built modules which already do this (perhaps just feeding it a list of coordinates and times)?
If not, what API would I need to use to reproduce the map behavior shown in the video?
Also are there any licensing issues with doing this in a desktop program which would only be seen by 1 user rather than on a publicly available web site?
I have used the Google Maps API for creating an embedded GPS window like the one you referenced in your link, but basically it was embedding a browser window and linking it up to Google Maps. You can manage the data yourself and pump it over to the browser. This can be done locally.
You'll need to do a few things.
Define the map scripts (with an html/Javascript file). These scripts will allow you to update the location you are displaying on the map which you will hook into code side to control.
In your GUI define a browser object and set it to navigate to the html file you've made and then use the document portion of that object to invoke scripts.
You should be able to control the GPS location once you've done that. The Google Maps API is referenced in your html file. That html file is key, it will need to have all the functions you want to use to update the GPS location and display it on the map.
As per pre-built modules an/or licensing I do not know.
We are trying to achieve is to collect fake gps tracks on some route without going in real time.
We first realized by using maps.google.com we can download kml file from any direction between designated points.But these points depend on shape of the road where if we go through a bridge,kml file comes within only begin and end points of it.(that's Directions Service)
I know this task sounds some lazy,but if there is a way to do this with Google or another service or by implementing some code on given route,we have to try it.
Any ideas ?
I found solution by using GIS desktop tool where points can be added manually.
By saving table as .kml,I achieved to collect gps route.It may not look GPS track alike,but it was to easy to handle the situation.
As the question implies, I'm looking for a way to programmatically screen grab a given panorama, I.E set a longitude and latitude and POV (pitch, yaw and zoom) and save the grab to the server. So far the most promise has been shown by
Using .net to control the google earth com api (http://earth.google.com/comapi/index.html), however I am unable to find a definitive answer on whether on not the street view layer is accessible via this means.
Embed the street view swf inside another swf that opens a socket to the web server to listen for requests, and passing commands (such as adjusting lat/lng and POV) to the street view swf and screen grabbing the view and saving it back to the server. The swf would either be running on the webserver or another server.
Questions about reliability and scalability come into play with both of these solutions. Has anyone got any further suggestions or ideas? The solution doesn't have to be real time, its assumed that some asynchronous "behind the scenes" processing will be happening.
Are you concerned with licensing? I would suspect that google limits what you can do with StreetView data, and likely prohibits "screen scraping"...
Assuming that you figured out how not to get sued by google, one option might be to trace the HTTP requests generated by the street view SWF, and try to reverse engineer the API. I would try to use http://fiddler2.com first (it is a marvellous tool for browser-based HTTP debugging), and if that does not work too well with the flash player, resort to http://www.wireshark.org (this is a general-purpose network sniffer, and might require some getting used to)
If you have the co-ordinates, POV and other variables then you can use Google Street View Image API
https://developers.google.com/maps/documentation/streetview/
For Instance -
http://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,%20-73.988354&fov=90&heading=235&pitch=10&sensor=false
You can loop through and keep changing the "heading" variable