react-mapboxmap

WebJar for react-mapboxmap

License

License

MIT
Categories

Categories

React User Interface Web Frameworks
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

react-mapboxmap
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

react-mapboxmap
WebJar for react-mapboxmap
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/iamale/MapboxMap

Download react-mapboxmap

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/react-mapboxmap/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>react-mapboxmap</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/react-mapboxmap/
implementation 'org.webjars.npm:react-mapboxmap:0.0.2'
// https://jarcasting.com/artifacts/org.webjars.npm/react-mapboxmap/
implementation ("org.webjars.npm:react-mapboxmap:0.0.2")
'org.webjars.npm:react-mapboxmap:jar:0.0.2'
<dependency org="org.webjars.npm" name="react-mapboxmap" rev="0.0.2">
  <artifact name="react-mapboxmap" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='react-mapboxmap', version='0.0.2')
)
libraryDependencies += "org.webjars.npm" % "react-mapboxmap" % "0.0.2"
[org.webjars.npm/react-mapboxmap "0.0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

MapboxMap

Notice: this never was a full-feature library, merely a layer on top of Mapbox JS SDK. For a better, more full fledged solution, try react-leaflet (in conjunction with the Mapbox Maps API in our case).

npm install react-mapboxmap
var React = require('react'),
    MapboxMap = require('react-mapboxmap');

var Master = React.createClass({
  render: function() {
    return (
      <div className="container">
        <MapboxMap
          mapId="mapbox.comic"
          zoomControl={false}
          center={[59.907433, 30.299848]} zoom={17}
          onMapCreated={this._onMapCreated}/>
      </div>
    );
  },
  _onMapCreated: function(map, L) {
    var marker = new L.Marker(new L.LatLng(59.907433, 30.299848));
    map.addLayer(marker);
  }
});

Attributes

  • mapId or src -- either a map id (examples.map-foo), a comma-separated list of ids, a URL to TileJSON (https://api.tiles.mapbox.com/v3/examples.map-0l53fhk2.json) or a TileJSON object

  • onMapCreated(map, L) -- a callback for furter customization. Params:

    • map -- the map object
    • L -- the Leaflet.js instance used to create the map (Mapbox.js included)

License

MIT

org.webjars.npm

Alexander Pushkov

I have changed my GitHub username, please visit @notpushkin or my GitLab :)

Versions

Version
0.0.2