Map path between two points Ionic 2 offline - google-maps

How to get a path offline between two points using my actual location ?
Is there a way to get it ? i read there is a library called Leaflet which can run offfline.

You might use de geolocalization native plugin and some javascript to paint a line between two points. I don't know about leaflet, but opne layers is a good tool to create offline maps.
https://ionicframework.com/docs/v2/native/geolocation/ .
http://openlayers.org/
I'm too trying to do something with offline map in ionic. Please post whatever you do with this resorcer and I'll do the same :)

Related

Flying along route Cesium JS

I just started experimenting with Cesium JS, loaded my data in WMS and WFS from Geoserver.
What I want to do now is how can I create an animation to fly along the tracking route ??
I want to achieve the same result as veloviewer more or less.
I've searched through forums but what I found is mostly about how to fly to a certain location.
Regards,
Yogi

How do I parse a json image returned from an API?

To make an example Wordpress plugin that shows an image, or at least stores it in the media library, I go out to the NASA Open API and fetch the Astronomy Picture of the Day. I have not yet tested that code, but assuming it works my problem is: then what? I guess I have to parse the return data and somehow get an image file I can upload to the library. I'm used to grabbing pre-known text fields such as data.customerid, etc. but never an image. The API site is not much help. I have gleaned from around here a few references to "base64" but I don't know what that means. I can't find a straightup example if what to do. Any thoughts?
you'll have to do steps along this lines, you are pretty much correct on that:
fetch response from API (example: https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY)
parse url:
use media_sideload_image function in WordPress to save image in media to be able to show it in your plugin or to your users..
I suggest you to start building your plugin from scratch and then when you get stuck post your code here and community can help you better..

Is there any tool to creating big size OpenStreetMap JPEG map

I want to ask some question to all of you.
Recently i got request from my friend to create several OpenStreetMap JPEG map with various size (from 1.5km x 1.5km, 12km x 12km, and 96km x 96km) in country level.
I wondering is there any tool or software to be able to create the map with size like that (from 1.5km x 1.5km until 96km x 96).
I already tested with QGIS map composer but it seems they only allow to create until 100.000 mm.
Thank you!
You can fetch the tiles you are interested in (be sure to read and follow the tile usage policy!). Which tiles to fetch can be calculated, take a look at the slippy map tilenames page. Then just stitch your JPEGs together to a large image, for example by using imagemagick.
Alternatively you can use bigmap / bigmap2 which does something very similar.
I wonder if something like Hugin would work as it could automatically align the tiles.
I have successfully rendered large maps for printing posters using nik2img.
The process is roughly the following:
Import data for the area you need to render from OpenStreetMap to a local PostgreSQL server. You can get area extracts from various sources.
Render the data from local database to image with nik2img.

PDF Annotator with JSON layers

I am attempting to create a pdf annotator using PDF.js and a HTML5 drawing app to create a JSON file.
Using this: https://github.com/mozilla/pdf.js/blob/master/examples/learning/prevnext.html
Maybe this: http://codecanyon.net/item/html5-drawing-tools/8869338?WT.oss_phrase=&WT.oss_rank=2&WT.z_author=appsandsites&WT.ac=search_thumb
to create a JSON like http://www.html5rocks.com/en/tutorials/canvas/integrating/#web
Any thoughts or suggestions on how to do this? Do you think I could use PHP to create and place the file on my server?
Direction on the best way to do this is appreciated.. what version of JSON, how to use canvas to create a file and edit it, etc
Update, I want to lay this over PDF.js:
https://github.com/trsanders/responsive-sketchpad
and then in PHP create a JSON file that stores the url of a PDF and the URL to the generated json/image.
Update 2/23
I found a document browser in Perl with flexpaper which lays aframework foundation for what I want to do, but does not add in drawing support. What I was thinking is the above image.
http://eric-blue.com/2010/02/12/example-document-browser-code/
Hypothes.is supports text annotation of PDFs (via PDF.js and Annotator). The plan at The Hypothesis Project (a non-profit...also where I work, fwiw) is to upstream the PDF related features that have been made to its customized Annotator, so they'll be available to more developers.
Here's an example of Hypothes.is loaded on a PDF via a proxy. The same functionality is provided without the proxy by using a bookmarklet in Firefox or the Hypothes.is Chrome extension.
Additionally (if you're wanting shape drawing on top of PDF.js rendered PDFs), you might check out the Annotorious polygon preview. Similar to what you've described, plus annotation, plus storage...though I don't believe it works on PDFs...just images.
There is also ongoing work being done at the W3C to build an interoperable annotation data model. Checkout the Annotation Working Group for more information.
Lastly, PDF.js is also getting work done to it now to support PDF-level annotations. Eventually, it should give PDF.js a strong foundation for exposing annotations loaded from other sources.
Hopefully that's enough to get you started. :)

How to plot markers in Maps Components or Google Maps Overlay Component - Pentaho?

I'm using Pentaho 4.8 and the plugin CDE for showing information in maps. I have followed the Map Component Reference, but I don't know what I am missing. The resultset is as they mentioned, but when I launch the preview it doesn't end to load.
I don't know what else I have to create, maybe a js file with something unknown? Help me please.
Do the samples work ?
If they do, you must be missing some step. Check the javascript console logs. maybe those will give you a clue.