1.2.5 • Published 5 years ago
map_wrapper_react v1.2.5
map_wrapper_react
Install
npm install --save map_wrapper_react import React from "react";
import { Map } from "map_wrapper_react";
const App = () => (
<Map mapKey={"yandex_map_key"}/>
)Map Props
| name | type | default | description |
|---|---|---|---|
| mapKey | string | "" | key for card |
| control | array | list of controls yandex map | |
| width | string | 100% | |
| height | string | 100vh | |
| zoom | number | 9 |
Additional controls
- MapListBox
import React from "react";
import { Map, MapListBox } from "map_wrapper_react";
const App = () => (
<Map mapKey={"yandex_map_key"}>
<MapListBox
label={"list"}
list={[
{name: "item1", uuid: "1"},
{name: "item2", uuid: "2"}
]}
onClick={(value) => {console.log(value)}}
/>
</Map>
)MapListBox Props
| name | type | default | description |
|---|---|---|---|
| label | string | "" | |
| list | array | ||
| onClick | function | ||
| config | object | null | null |
- ObjectManager
import React from "react";
import { Map, ObjectManager } from "map_wrapper_react";
const data = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": 0,
"geometry":
{
"type": "Point",
"coordinates": [55.831903, 37.411961]
},
"properties": {}
},
]
}
const App = () => (
<Map mapKey={"yandex_map_key"}>
<ObjectManager
config={{
geoObjectOpenBalloonOnClick: false
}}
onClick={( objectManager, objectId ) => {}}
data={ data }
hidden={ false }
filter={ null }
/>
</Map>
)ObjectManager Props
| name | type | default | description |
|---|---|---|---|
| config | object | null | null | |
| onClick | func | function({ objectManager: string, objectId: string }) | |
| data | FeatureCollection | ||
| hidden | boolean | false | shows hide or show points of the objectManager |
| filter | object | null | null | { propertiesName: string, propertiesValue: string } the name and value of the property by which the filtering occurs |
License
MIT © esseregin
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.0
5 years ago
1.2.1
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.0
5 years ago
0.6.1
5 years ago
0.6.0
5 years ago
0.5.9
5 years ago
0.5.8
5 years ago
0.5.7
5 years ago
0.5.6
5 years ago
0.5.5
5 years ago
0.5.4
5 years ago
0.5.3
5 years ago
0.5.2
5 years ago
0.4.4
5 years ago
0.5.1
5 years ago
0.4.3
5 years ago
0.4.1
5 years ago
0.4.0
5 years ago
0.4.2
5 years ago
0.3.0
5 years ago
0.2.9
5 years ago
0.2.8
5 years ago
0.2.7
5 years ago