irim/yii2-yandex-maps
处理Yandex.Maps
0.3
2016-09-19 17:48 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-18 10:47:54 UTC
README
处理地图
安装
安装此扩展的首选方式是通过composer。
运行
php composer.phar require --prefer-dist irim/yii2-yandex-maps "*"
或
"irim/yii2-yandex-maps": "*"
将以下内容添加到您的composer.json
文件的require部分。
使用方法
<?= \irim\yandex\maps\YandexMaps::widget([ 'id'=>'myNewMap', 'style'=>'width:400px;heigth:200px', 'map'=>[ 'type'=>\irim\yandex\maps\YandexMaps::TYPE_HYBRID, 'controls'=>FALSE, 'zoom'=>16, 'center'=>[50.450418,30.523541] ], 'placemarks' => [ [ 'hint'=>'проспект Ленина, 1', 'icon'=>[ 'iconLayout'=>'default#image', 'iconImageHref'=>'https://sandbox.api.maps.yandex.net/examples/ru/2.1/icon_customImage/images/myIcon.gif', 'iconImageSize'=>[30, 42], 'iconImageOffset'=>[-3, -42] ], 'ballon'=>'Какойто балун :)' ], ['coords'=>[55.858585, 37.48498]], ['coords'=>[55.723123, 37.406067]], ['coords'=>[55.844708, 37.74887]], ['coords'=>[55.781329, 37.442781]], ['coords'=>[55.616448, 37.452759]], ['coords'=>[55.803972, 37.65961]], ['coords'=>[55.691046, 37.711026]], ['coords'=>[55.803972, 37.65961]], ['coords'=>[55.691046, 37.711026]], ['coords'=>[55.691046, 37.711026]], ], 'clusters'=>TRUE ]);); ?>```