Skip to content

Super experssion must either be null or a function - Mapbox #9

@pm02446

Description

@pm02446

import React, {Componet} from 'react';
import MapboxGL from '@react-native-mapbox-gl/maps';

MapboxGL.accessToken =
'pk.eyJ1IjoicG1hcnJlcm8iLCJhIjoiY2s0eW1vNno0MDI3YzNucG9jOGdzOWJmZiJ9.59Mq2rt899naM6nylQ9jeA';

export default class WMS extends Componet{
redner(){
const map = new MapboxGL.Map({
container: 'map',
style: 'mapbox://styles/mapbox/light-v10',
zoom: 8,
center: [-74.5447, 40.6892]
});
map.on('load', function() {
map.addLayer(
{
'id': 'wms-test-layer',
'type': 'raster',
'source': {
'type': 'raster',
'tiles': [
'https://img.nj.gov/imagerywms/Natural2015?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=Natural2015'
],
'tileSize': 256
},
'paint': {}
},
'aeroway-line'
);
});
return

map
;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions