1.2.5 • Published 5 years ago

map_wrapper_react v1.2.5

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

map_wrapper_react

NPM JavaScript Style Guide

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

nametypedefaultdescription
mapKeystring""key for card
controlarray list of controls yandex map
widthstring100%
heightstring100vh
zoomnumber9

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

nametypedefaultdescription
labelstring""
listarray
onClickfunction
configobject | nullnull

  • 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

nametypedefaultdescription
configobject | nullnull
onClickfuncfunction({ objectManager: string, objectId: string })
dataFeatureCollection
hiddenbooleanfalseshows hide or show points of the objectManager
filterobject | nullnull{ 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