How to load a local shape or geojson file in to leaflet in Asymmetrik/ngx-leaflet? - ngx-leaflet

I am using Asymmetrik/ngx-leaflet to build a map based application which can load and view external shape files. Is there any way to show local shape files?

It looks like there's a Leaflet plugin for shapefiles. I don't know if it's up to date, but you might start there.
There's also a tutorial on how to integrate third party plugins with #asymmetrik/ngx-leaflet.
Read through the examples to get a sense of how to get the plugin loaded into your Angular app. Then, you probably just need to create your shapefile layer and add it to the layers array that is bound to ngx-leaflet just like any other layer.

Related

Is there any package to show highlighted vector maps in VueJS?

I want to implement a map like this:-
in which vector layers of countries are highlighted according to some metric value. I tried to search for some package but found JQuery based JQVMaps and jvectormap, which I want to avoid to use since my framework is VueJS.
Can someone suggest some package for this? Or should I go for integrating these Jquery based packages itself?
Leaflet is great and simple to learn library to work with maps. Fortunately there is a wrapper called vue2-leaflet that make it work with Vue. Regarding your Image this part of docs may useful for you.

Incorrect Visualization of Geojson using Vue2-Leaflet

I'm having a problem when visualizing my GeoJSON files on the web using Vue2Leaflet.
The user uploads files in the form of .dxf, then the Django backend process it into various layers and send it back to the front end. I received all the layers in the form of GeoJSON object, and I use l-map of Vue2Leaflet to visualize whichever layer is selected.
Could you please tell me what's happening here? The same code works perfectly with the example API given by the developer themselves, but not with my GeoJSON.
Reference Example
Note: My GeoJSON if visualized in QGIS shows a map shape, or at least not such a straight line for the layer.

How to render the data from .mvt or .vector.pbf file from scratch?

I signed up for the Mapbox vector tiles service and I've noticed that they provide map data in .mvt and .vector.pbf formats.
I tried to open these files with normal text editor and read them with the intention to see the structure and find a way to draw some parts of a map with javascript/html drawing functions. However , the files data seems unreadable for me.
How can I parse these files , and how can I draw simple map with their content ? (I read the .MVT specs here https://docs.mapbox.com/vector-tiles/specification , but I couldn't find any solution)
Note that I want to do it from scratch , without using mapbox-js or Leaflet libraries.

How to use external data when using ArcGIS API for JavaScript

I am building a dashboard(web app) to present the landslide related data. I have some external maps (slope, drainage and etc). I want to show them as layers in the web app. I was unable to find a correct way of doing so. Can someone suggest a solution?
You mentioned in your comment that you're trying to map Shapefiles. If you want to load your Shapefiles into the map from the JavaScript API, there's a sample here that shows you how to load that file into the map.
If you'd like to add it to your Web Map so that you can view it in an app, you can do that too, just go to the Arcgis.com Map page and click Add > Layer from File (more info).

How to create a custom chart with Appcelerator Titanium (Alloy) for Android

How I create a custom chart like this
with Titanium's Alloy elements (xml, tss, js - no SVG or canvas)? Any suggestion?
One approach which worked for me was the using of a webview and Google Charts.
I stored my "skeleton html page" as local asset, and inside it I wrote the minimum necessary javascript to get the json (from the controller) and to draw the chart.
I didn't need to show data offline so I directly linked the online library but I'm almost sure it's possible to use it offline too.
https://developers.google.com/chart/