💻
Flutter documentation
  • Flutter documentation
    • Starting an App
    • Import
  • Visual Studio Code
  • Widgets
    • Stateless Widget
    • Stateful Widget
    • Scaffold
    • Text
      • OverFlow
      • Rounded background text
    • Padding
    • Align
    • DraggableScrollableSheet
    • Container
    • Decorated box
    • Expanded
    • IntrinsicHeight
    • IntrinsicWidth
    • ListView.builder(...)
    • Buttons
    • Gauge
    • Navigator
      • WillPopScope
    • Web View
    • Divider
    • Future builder
    • Image
      • Cached_network_image
      • Fade In Image
    • ClipOval
    • InkWell
    • Wrap
    • SingleChildScrollView
    • Stack
    • FittedBox
    • DropdownButton
    • ValueListenableBuilder
    • Maps
    • fl_chart
    • Set SystemNavigation Bar Color
    • Onesignal
    • Builder
    • Set orientation
    • SSE
    • Chat
    • Flutter_animate
    • Supabase
      • Android
    • Changing name and package name
    • Sign apk/abb
  • Dart
    • If / Else in one line
    • Functions
  • Others
  • Airtable
Powered by GitBook
On this page
  1. Widgets

Maps

Show maps in the app

FlutterMap(
          mapController: mapController,
          options: MapOptions(
            center: LatLng(51.509364, -0.128928),
            zoom: 9.2,
          ),
          children: [
            TileLayer(
              urlTemplate:
                  'http://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png',
              userAgentPackageName: 'com.example.app',
            ),
          ],
        ),

These are a list of URLs that can be used as the urlTemplate property in the MapTileLayer widget to display different types of maps.

  • Carto Positron: https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png

  • CARTO dark: http://a.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}.png

  • Bing: http://ecn.t3.tiles.virtualearth.net/tiles/a{q}.jpeg?g=1&mkt={culture}

  • Carto: https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png

  • Esri National Geographic: http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/{z}/{y}/{x}.png

  • Esri Navigation Charts: http://server.arcgisonline.com/ArcGIS/rest/services/Specialty/World_Navigation_Charts/MapServer/tile/{z}/{y}/{x}.png

  • Esri Ocean: http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_BaseMap/MapServer/tile/{z}/{y}/{x}.png

  • Esri Physical: http://server.arcgisonline.com/ArcGIS/rest/services/World_Physical_Map/MapServer/tile/{z}/{y}/{x}.png

  • Esri Reference/World Transportation: http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer/tile/{z}/{y}/{x}.png

  • Esri World Imagery: http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}.png

  • Esri World Street Map: http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}.png

  • Esri World Topo Map: http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}.png

  • Google Hybrid: http://khm1.googleapis.com/kh?v=142&x={x}&y={y}&z={z} or http://mt1.googleapis.com/vt?lyrs=h&x={x}&y={y}&z={z}

  • Google Roadmap: http://mt1.googleapis.com/vt?x={x}&y={y}&z={z}

  • Google road & terrain layers, with high-res (Retina) support: roadmap: http://mt1.googleapis.com/vt?x={x}&y={y}&z={z} terrain: http://mt{s}.googleapis.com/vt?lyrs=t,r&x={x}&y={y}&z={z}

  • Google Satellite: https://khm1.googleapis.com/kh?v=142&x={x}&y={y}&z={z}

  • OpenStreetMap Mapnick: http://tile.openstreetmap.org/{z}/{x}/{y}.png

  • OSM Standard: http://a.tile.openstreetmap.org/{z}/{x}/{y}.png

  • OSM Cycle Map: http://tile.opencyclemap.org/cycle/{z}/{x}/{y}.png

  • Thunderforest Outdoors: https://tile.thunderforest.com/outdoors/{z}/{x}/{y}.png

  • Thunderforest Transport Dark: https://tile.thunderforest.com/transport-dark/{z}/{x}/{y}.png

  • Thunderforest Transport: https://tile.thunderforest.com/transport/{z}/{x}/{y}.png

  • Thunderforest Landscape: https://tile.thunderforest.com/landscape/{z}/{x}/{y}.png

  • OpenMapSurfer: http://korona.geog.uni-heidelberg.de/tiles/roads/x={x}&y={y}&z={z}

These URLs can be used to display maps from various sources, including Bing, Esri, Google, OpenStreetMap, and Thunderforest. Each one provides a different style of map, such as satellite, terrain, or street map.

It's important to note that when using these URLs, you should check the licenses associated with each map provider and make sure you are in compliance with their terms of use. These URLs have been sourced from various websites such as "https://mappinggis.com/2018/03/como-anadir-mapas-base-en-qgis-3-0-openstreetmap-google-carto-stamen" and "https://sites.google.com/a/blocoware.com/speedohelp/home/map-sources" and it is recommended to verify the information with the official sources.

PreviousValueListenableBuilderNextfl_chart

Last updated 2 years ago