Skip to content

Instantly share code, notes, and snippets.

@EvanBacon
Created February 17, 2019 02:09
Show Gist options
  • Save EvanBacon/a57ea16c5687fdf0d7d875f9d9bd50e1 to your computer and use it in GitHub Desktop.
Save EvanBacon/a57ea16c5687fdf0d7d875f9d9bd50e1 to your computer and use it in GitHub Desktop.
A custom map renderer to spice things up πŸ•
import React from 'react';
// import
import { MapView } from 'expo';
export default BaseMap = ({ children, ...props }) => (
<MapView
{...props}
>
<MapView.UrlTile
/**
* The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
* For example, http://c.tile.openstreetmap.org/{z}/{x}/{y}.png
*/
urlTemplate="http://10.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png"
/>
{children}
</MapView>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment