All Projects → NocheVolta → FramerMapboxJS

NocheVolta / FramerMapboxJS

Licence: other
Simplest way to integrate Mapbox maps on your Framer prototypes.

Programming Languages

coffeescript
4710 projects

Projects that are alternatives of or similar to FramerMapboxJS

Maps
A Mapbox GL react native module for creating custom maps
Stars: ✭ 893 (+1884.44%)
Mutual labels:  map, mapbox
Airmapview
A view abstraction to provide a map user interface with various underlying map providers
Stars: ✭ 1,824 (+3953.33%)
Mutual labels:  map, mapbox
Mapbox Gl Js
Interactive, thoroughly customizable maps in the browser, powered by vector tiles and WebGL
Stars: ✭ 8,017 (+17715.56%)
Mutual labels:  map, mapbox
Mbxmapkit
DEPRECATED - Lightweight Mapbox integration with MapKit on iOS
Stars: ✭ 332 (+637.78%)
Mutual labels:  map, mapbox
traffic
Massively real-time traffic streaming application
Stars: ✭ 25 (-44.44%)
Mutual labels:  map, mapbox
Mapbox Gl Native
Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
Stars: ✭ 4,091 (+8991.11%)
Mutual labels:  map, mapbox
Mapbox.js
Mapbox JavaScript API, a Leaflet Plugin
Stars: ✭ 1,819 (+3942.22%)
Mutual labels:  map, mapbox
Mapbox Gl Native Android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
Stars: ✭ 135 (+200%)
Mutual labels:  map, mapbox
school-finder
👀 Find schools by location
Stars: ✭ 16 (-64.44%)
Mutual labels:  map, mapbox
Maps
🌍🌏🌎 The whole world fits inside your cloud!
Stars: ✭ 253 (+462.22%)
Mutual labels:  map, mapbox
angular-mapboxgl-directive
AngularJS directive for Mapbox GL
Stars: ✭ 43 (-4.44%)
Mutual labels:  map, mapbox
map
🏳️‍🌈🗺 A map of community centers and other helpful information for queer (LGBTQ) people.
Stars: ✭ 15 (-66.67%)
Mutual labels:  map, mapbox
kirby-locator
A simple map & geolocation field, built on top of open-source services and Mapbox. Kirby 3 only.
Stars: ✭ 83 (+84.44%)
Mutual labels:  map, mapbox
Messenger
iOS - Real-time messaging app 🎨
Stars: ✭ 491 (+991.11%)
Mutual labels:  map, mapbox
ReminderPro
ReminderPro(location, note, voice recording)
Stars: ✭ 27 (-40%)
Mutual labels:  map, mapbox
L7
🌎 Large-scale WebGL-powered Geospatial Data Visualization analysis framework which relies on Mapbox GL or AMap to render basemaps.
Stars: ✭ 2,517 (+5493.33%)
Mutual labels:  map, mapbox
earth
🌏 A map of places I've checked in on Earth.
Stars: ✭ 96 (+113.33%)
Mutual labels:  map, mapbox
transit
Massively real-time city transit streaming application
Stars: ✭ 20 (-55.56%)
Mutual labels:  map, mapbox
AhaAlgorithms
《啊哈算法》书上代码
Stars: ✭ 47 (+4.44%)
Mutual labels:  map
PinFloyd
MapKit annotations clustering for iOS
Stars: ✭ 29 (-35.56%)
Mutual labels:  map

Mapbox Framer Module

license PRs Welcome Maintenance

Simplest way to integrate Mapbox maps on your prototypes; you can define size, zoom, center point and even it lets you to use the full API. Obviously you need an active internet connection to load the maps.

mapbox gif

Installation

Install with Framer Modules

Manual

  1. Copy the MapboxJS.coffee file to the ‘modules’ folder inside your Framer project
  2. Add this line on the top
{MapboxJS, CustomMarker, Marker, animateMarker} = require 'MapboxJS'

How to use

Init the map with your accessToken, generate it on Mapbox website, it's free. Without this, the map won't work.

myMap = new MapboxJS
  accessToken: 'insertHereYourAccessToken'

Customization

  • style String : The map's style url. (default mapbox://styles/mapbox/streets-v9)
  • center Array : The inital geographical centerpoint of the map. (default [-3.703, 40.409], is Madrid) *
  • zoom Integer : The initial zoom level of the map. (default 13.9)
  • size Integer or Object : Size of the map, set width and height using { width:640, height: 480 } or use a single number to create a square. (default Screen.size)
  • pitch Integer : The initial pitch (tilt) of the map, measured in degrees away from the plane of the screen (0-60).
  • bearing Integer : The initial bearing (rotation) of the map, measured in degrees counter-clockwise from north.
  • x : Initial X position (default 0)
  • y : Initial Y position (default 0)
  • interactive Boolean : If false , no mouse, touch, or keyboard listeners will be attached to the map, so it will not respond to interaction. (default true)

* Mapbox GL uses longitude, latitude coordinate order (as opposed to latitude, longitude) to match GeoJSON.

Methods

  • .wrapper : Returns the layer that contains the map
  • .mapbox : Returns the Mapbox instance, useful to interact with the API
  • .flyTo(point) : Animates map to new location

Interact with Mapbox API

Read Mapbox GL JS documentation to learn how to use the API.

Some extra elements require to load other Mapbox JS files, for example if you want to add a search box (geocoder), this example could help you.

Add a marker with animation

# Latitude and Longitude points
centerPoint = [-3.70346, 40.41676]
startPoint = [-3.70773, 40.42135]
endPoint = [-3.702478, 40.41705]

# Create the map
myMap = new mapboxJS
  accessToken: 'insertHereYourAccessToken'
  style: 'yourCustomStyleURL'
  center: centerPoint

# Create a maker using the Layer's attributes and put it into the map
simpleMarker = new Marker
  map: myMap.mapbox
  lngLat: endPoint
  size: 20
  borderRadius: 40
  backgroundColor: "#FF0000"

scaleUp = new Animation simpleMarker,
  size: 30
  options: time: 1, curve: Bezier.ease
scaleUp.start()
scaleDown = scaleUp.reverse()

scaleUp.onAnimationEnd -> scaleDown.start()
scaleDown.onAnimationEnd -> scaleUp.start()

Add a marker from the Design tab

customMarker = new CustomMarker
  map: myMap.mapbox
  lngLat: startPoint
  element: targetName # Target must be a frame

Paint route between two points

route = new PaintRoute
  id: 'route-1' # Must be a unique name
  map: myMap.mapbox
  start: startPoint
  end: endPoint
  layout: { 'line-cap': 'round' }
  paint: { 'line-width': 2, 'line-color': '#FF0000', "line-dasharray": [1, 2, 0]}

Read more about now to use the layout and paint properties.

Animate marker through a route

animateMarker(customMarker, endPoint, 0.01)

Animate map to certain point

myMap.flyTo(endPoint)

Create 3D map

# use build3D method on mapobject load, mind that  bearing, hash and pitch should be set at mapbox initialization
myMap = new MapboxJS
  accessToken: mapboxToken	
  style: styles.light
  zoom: 12
  center: originPoint
  pitch: 45,
  bearing: -17.6,
  hash: true
myMap.mapbox.on 'load', ->
  myMap.build3d()

Sample project

Framer prototype

mapbox gif 2

Contact & Credits

You can find us on Twitter @NocheVolta, @mamezito

Inspirated on this project made by John Sherwin.

This project is not realted to the Mapbox company.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].