Nativescript Angular 2 issue while using MapBox inside the HTML
See original GitHub issueThe case is the following.
I have registered new Element inside the main.ts file using registerElement
method.
main.ts
file
var map = require("nativescript-mapbox");
registerElement("Map", () => map.Mapbox);
Then I have try to use this element inside my HTML file as follow.
app.component.html
<GridLayout>
<Map
accessToken="ACCESS_TOKEN"
width="250"
height="150"
latitude="52.3702160"
longitude="4.8951680"
zoomLevel="3"
mapStyle="light"
hideAttribution="false"
showUserLocation="true"
hideCompass="false"></Map>
</GridLayout>
However on the screen will be show black box even, when the accessToken has been insert. The only way to use this component inside the NS Angular 2 project is to do from code behind, but the Component will be displayed above the other components.
Issue Analytics
- State:
- Created 7 years ago
- Comments:15
Top Results From Across the Web
typescript angular 2 · Issue #6 - GitHub
I'm trying to define the Mapbox view with Typescript/Angular2 from HTML. in main.ts. var map = require("natinescript-mapbox"); import ...
Read more >angular - Mapbox with nativescript | element-registry issue
Could someone help me? I have tried to make an app in NativeScript-Angular using mapbox following This video. In the [Mapbox docs] ...
Read more >Using A Mapbox In A NativeScript Angular Application
We're going to see how to include Mapbox in our NativeScript Android and iOS mobile application using Angular and TypeScript.
Read more >https://raw.githubusercontent.com/EddyVerbruggen/n...
[4.4.0](https://github.com/EddyVerbruggen/nativescript-mapbox/tree/4.4.0) ... bugs:** - Nativescript Angular 2 issue while using MapBox inside the HTML ...
Read more >Fit a map to a bounding box | Mapbox GL JS
This example zooms and pans the map so the new visible area of the map fits within the specified geographical bounds.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s great news, thanks for confirming it so quickly! I’ll push 2.3.0 to npm later today so everyone can easily get this fix.
I’ve now applied a similar fix for Android - can you try the latest version from GitHub? Seems to work great with your demo app.