Yandex Maps
Yii Yandex Maps addition to allowing sozlavat map with labels and lines.
Place the extension files in a directory 'extensions' of your application. For example, in a folder yandexmap
'ext.yandexmap.YandexMap'
$this->widget('ext.yandexmap.YandexMap',array( 'id'=>'map', 'width'=>600, 'height'=>400, 'center'=>array(55.76, 37.64), 'placemark' => array( array( 'lat'=>55.8, 'lon'=>37.8, 'options'=>array( 'balloonContentHeader'=>'header', 'balloonContentBody'=>'body', 'balloonContentFooter'=>'footer', ) ) ), 'polyline' => array( array('lat'=>55.80,'lon'=>37.30), array('lat'=>55.80,'lon'=>37.40), array('lat'=>55.70,'lon'=>37.30), array('lat'=>55.70,'lon'=>37.40), 'options'=>array( 'strokeWidth'=> 5 // ширина линии' ) ), ));
Placemark (labels) - can be passed as a single item or a group of elements.
... 'placemark' => array( 'lat'=>55.8, 'lon'=>37.8, 'options'=>array( 'balloonContentHeader'=>'header', 'balloonContentBody'=>'body', 'balloonContentFooter'=>'footer', ) ), ...
group
... 'placemark' => array( array( 'lat'=>55.8, 'lon'=>37.8, 'options'=>array( 'balloonContentHeader'=>'header', 'balloonContentBody'=>'body', 'balloonContentFooter'=>'footer', ) ), array( 'lat'=>55.8, 'lon'=>37.8, 'options'=>array( 'balloonContentHeader'=>'header', 'balloonContentBody'=>'body', 'balloonContentFooter'=>'footer', ) ), ), ...
Polyline (broken lines) - you can peredevat as one item or as Grumm elements. Tocher coordinates given arrays, and can be infinite.
... 'polyline' => array( array('lat'=>55.80,'lon'=>37.30), array('lat'=>55.80,'lon'=>37.40), array('lat'=>55.70,'lon'=>37.30), array('lat'=>55.70,'lon'=>37.40), 'options'=>array( 'strokeWidth'=> 5 // ширина линии ) ) ...
group
... 'polyline' => array( array( array('lat'=>55.80,'lon'=>37.30), array('lat'=>55.80,'lon'=>37.40), array('lat'=>55.70,'lon'=>37.30), array('lat'=>55.70,'lon'=>37.40), 'options'=>array( 'strokeWidth'=> 5 // ширина линии ) ), array( array('lat'=>55.80,'lon'=>37.30), array('lat'=>55.80,'lon'=>37.40), array('lat'=>55.70,'lon'=>37.30), array('lat'=>55.70,'lon'=>37.40), 'options'=>array( 'strokeWidth'=> 5 // ширина линии ) ), ), ...
Total 4 comments
API components can be loaded via HTTP, and for HTTPS. If the site supports for both protocols, you can omit the explicit scheme in the src attribute of the element script. I corrected this flaw to indicate full reference (default http), please download the latest version from github.com
sorry just change the / to \ in this line and no error so far but also nothing show up on screen.
Still trying to resolve it if there is some thing Im doing wrong.
which line / situation is this error? in addition are not using the file_get_contents
file_get_contents(C:\wamp\www\demo\/api-maps.yandex.ru/2.0-stable/?load=package.full&lang=ru-RU) [function.file-get-contents]: failed to open stream: No such file or directory
Leave a comment
Please login to leave your comment.