Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0 🎉 🎉 🎉 #130

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
18a7a9a
chore: cleanup before v2
AnatoleLucet Jun 13, 2023
e403f10
chore: init toolchain
AnatoleLucet May 6, 2023
fd66d66
feat: add GMap & GMapMarker components
AnatoleLucet May 6, 2023
344c709
feat: add GMapAnimmatedMarker component
AnatoleLucet May 7, 2023
d578aaa
chore: rename package
AnatoleLucet May 11, 2023
02ed021
chore: add .npmignore
AnatoleLucet May 11, 2023
376850c
feat: add GMapsPolyline and GMapsAnimatedPolyline (#1)
AnatoleLucet Jun 6, 2023
3b4a8ec
feat: add GMapsPolygon and GMapsAnimatedPolygon
AnatoleLucet Jun 13, 2023
d7e7663
docs: add list of TODOs
AnatoleLucet Jun 13, 2023
1c51f90
chore: fill package.json info
AnatoleLucet Jun 19, 2023
b95952d
feat(animations): add more easing functions
AnatoleLucet Jun 24, 2023
9991622
refactor: rename 'shenanigan' lib to 'utils'
AnatoleLucet Jun 24, 2023
33a3e77
docs(components): add docs for every components
AnatoleLucet Jun 27, 2023
003f4c2
docs(animated components): add screen captures
AnatoleLucet Jun 27, 2023
18e40fb
chore(ci): add build/lint/test jobs
AnatoleLucet Jun 28, 2023
124d51d
feat(animation): add shape interpolation & lots of tests
AnatoleLucet Jun 28, 2023
60b30c0
chore: update lockfile
AnatoleLucet Jun 28, 2023
5843c11
chore(toolchain): add eslint
AnatoleLucet Jun 28, 2023
9dc827b
fix: typos and minor issues
AnatoleLucet Jul 15, 2023
8846f67
docs: document hooks and contributing.md
AnatoleLucet Jul 15, 2023
15d1971
docs: fix typos
AnatoleLucet Sep 2, 2023
b2afcde
chore: format code & variables names
AnatoleLucet Sep 12, 2023
7be910a
chore(contributing.md): add '.env' instructions
AnatoleLucet Sep 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

4 changes: 4 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Fill in these values and rename this file to .env
# Then you can run any example in the `examples/` folder with `cd examples/<name> && pnpm dev`
API_KEY=
AnatoleLucet marked this conversation as resolved.
Show resolved Hide resolved
MAP_ID=
AnatoleLucet marked this conversation as resolved.
Show resolved Hide resolved
23 changes: 0 additions & 23 deletions .eslintrc

This file was deleted.

19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
demo/build.js
node_modules/
# MacOS
.DS_Store

# NodeJS
node_modules
.pnpm-store

# IDEs
.idea
.vscode
.fleet

# Build output
dist

# Env vars
.env
27 changes: 22 additions & 5 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
demo/
src/
.babelrc
Procfile
server.js
# MacOS
.DS_Store

# NodeJS
node_modules
.pnpm-store

# IDEs
.idea
.vscode
.fleet

# config files
/*.js
/*.mjs
/*.cjs
/*.ts
/tsconfig.json

# source
/src/

8 changes: 8 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
arrowParens: "avoid",
trailingComma: "all",
bracketSpacing: true,
singleQuote: false,
semi: true,
tabWidth: 2,
};
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion Procfile

This file was deleted.

111 changes: 15 additions & 96 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,101 +1,20 @@
[![Build Status](https://travis-ci.org/MicheleBertoli/react-gmaps.svg?branch=master)](https://travis-ci.org/MicheleBertoli/react-gmaps)
# React GMaps

React Gmaps
===========
A modern Google Maps integration for ReactJS

A [Google Maps](https://developers.google.com/maps/documentation/javascript/) component for [React.js](http://facebook.github.io/react/)
## Features

Features
--------
- Marker, Polyline, Polygon components and more
- Hook based
AnatoleLucet marked this conversation as resolved.
Show resolved Hide resolved
- Highly extensible
- Interpolation animations for everything (markers, polygons, etc.)

- Lazy Google Maps loading
- Easy to use
## TODOs

Installation
------------

```sh
$ npm install react-gmaps --save
```

Demo
------------

[http://react-gmaps.herokuapp.com/](http://react-gmaps.herokuapp.com/)

Usage
-----

```javascript
import React from 'react';
import ReactDOM from 'react-dom';
import {Gmaps, Marker, InfoWindow, Circle} from 'react-gmaps';

const coords = {
lat: 51.5258541,
lng: -0.08040660000006028
};

const params = {v: '3.exp', key: 'YOUR_API_KEY'};

class App extends React.Component {

onMapCreated(map) {
map.setOptions({
disableDefaultUI: true
});
}

onDragEnd(e) {
console.log('onDragEnd', e);
}

onCloseClick() {
console.log('onCloseClick');
}

onClick(e) {
console.log('onClick', e);
}

render() {
return (
<Gmaps
width={'800px'}
height={'600px'}
lat={coords.lat}
lng={coords.lng}
zoom={12}
loadingMessage={'Be happy'}
params={params}
onMapCreated={this.onMapCreated}>
<Marker
lat={coords.lat}
lng={coords.lng}
draggable={true}
onDragEnd={this.onDragEnd} />
<InfoWindow
lat={coords.lat}
lng={coords.lng}
content={'Hello, React :)'}
onCloseClick={this.onCloseClick} />
<Circle
lat={coords.lat}
lng={coords.lng}
radius={500}
onClick={this.onClick} />
</Gmaps>
);
}

};

ReactDOM.render(<App />, document.getElementById('gmaps'));
```

Test
----

```sh
$ npm test
```
- [x] Marker component (displays ReactJS components)
- [ ] LegacyMarker component (displays images only)
- [x] Polyline component
- [x] Polygon component
- [ ] Circle component
- [ ] Rectangle component
- [ ] Overlays
13 changes: 0 additions & 13 deletions demo/index.html

This file was deleted.

66 changes: 0 additions & 66 deletions demo/index.js

This file was deleted.

18 changes: 0 additions & 18 deletions dist/components/circle.js

This file was deleted.

Loading