0

I am using mapbox plug-in in my nativescript project. I have to show few markers on the map and I would like to set these titles to always visiable. Is there an easy way to do it on nativescript plug-in ?

args.map.addMarkers([
    {
        lat: 41.0063886,
        lng: 28.9781057,
        title: 'Area 1',
        subtitle: 'Something',
        onCalloutTap: function () {
            console.log("");
        },
    }

This is how I add a marker.

<ContentView height="320" width="320">
    <map:Mapbox
        accessToken=""
        mapStyle="light"
        latitude="41.01557434"
        longitude="28.9800726"
        zoomLevel="13"
        showUserLocation="true"
        mapReady="onMapReady">
    </map:Mapbox>
</ContentView>

and this is how I create the map.

1 Answer 1

0

I'm the author of that plugin. There's no way AFAIK to make the callout appear without the user interacting with the marker. That's not a limitation of the plugin, rather the native SDK.. so your best option is to open a ticket on their GitHub and ask the same question (or refer to this SO question). https://github.com/mapbox/mapbox-gl-native/

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.