React OpenLayers Fiber
IntroductionDocsExamples
/
GitHub
/
  • OpenLayers examples
    • Accessible Map
    • Bing Maps
    • Clustered Features
    • Draw and Modify Features
    • Draw Shapes
    • Dynamic Data
    • GeoJSON
    • Icon Symbolizer
    • Image Filters
    • Mapbox Vector Tiles
    • Popup
    • Preload Tiles
    • Image Reprojection
    • OpenStreetMap Reprojection
    • Select Features
    • Simple Map
    • Static Image
    • turf.js
    • Tiled WMS
    • XYZ Retina Tiles
    • XYZ
    • Zoomify
  • Advanced examples
    • Declaratively move view
    • Dynamic styles
    • Dynamic points
    • Retina
    • Performance
    • Kitchen Sink
  • Introduction
  • Docs
    • Getting Started
    • Components
    • Props
    • Imperative Fallback
  • Examples
    • OpenLayers examples
      • Accessible Map
      • Bing Maps
      • Clustered Features
      • Draw and Modify Features
      • Draw Shapes
      • Dynamic Data
      • GeoJSON
      • Icon Symbolizer
      • Image Filters
      • Mapbox Vector Tiles
      • Popup
      • Preload Tiles
      • Image Reprojection
      • OpenStreetMap Reprojection
      • Select Features
      • Simple Map
      • Static Image
      • turf.js
      • Tiled WMS
      • XYZ Retina Tiles
      • XYZ
      • Zoomify
    • Advanced examples
      • Declaratively move view
      • Dynamic styles
      • Dynamic points
      • Retina
      • Performance
      • Kitchen Sink

Tiled WMS

See https://openlayers.org/en/latest/examples/wms-tiled.html

import React from "react";
import "ol/ol.css";
import { Map } from "@react-ol/fiber";

export const ExampleTiledWMS = () => {
  return (
    <Map>
      <olView initialCenter={[-10997148, 4569099]} initialZoom={4} />
      <olLayerTile>
        <olSourceOSM />
      </olLayerTile>
      <olLayerTile>
        <olSourceTileWMS
          url="https://ahocevar.com/geoserver/wms"
          params={{ LAYERS: "topp:states", TILED: true }}
          serverType="geoserver"
          transition={0}
        />
      </olLayerTile>
    </Map>
  );
};
turf.js
XYZ Retina Tiles

    On This Page


Edit this page on GitHub
MIT 2022 © Vincent Lecrubier.