Generate URLs to show Yandex maps as jpeg images
Generate URLs to show Yandex maps as jpeg/png images.
var stym=require'static-yandex-map';var s=37.62007055.753630//Creating map object - setting coordinates of map center -////getting API key is not mandatory// .setKey('key') //You can get it here -//but you will have some limitations without itsetType'satellite'//one of 'map','satellite','hybrid','traffic'setSize650450//image size in pixels - max size is 650x450 -//setZ13//Setting map scale 0-17(highest)////.setSpan(0.02,0.02)//Set viewport span in degrees - analogous to setZ//setLang'en-US'//select one of 'ru-RU','tr-TR', 'en-US', 'uk-UA'//Placing points on map//details here :addPoint37.62007055.753630'pm''wt''m'1addPoint37.6455.76363'pm''wt''m'99;console.logsgetUrl;// ->
This is example of map:
On *nix machines Yandex Map api key can be set as enviroment variable:
$ export yandexMapApiKey='ALTJHk8BAAAAREWTEg=='; node app.js
You can get this key from this page: http://api.yandex.ru/maps/getkey.xml
Link to full documentation on Yandex.Maps API http://api.yandex.com/maps/doc/staticapi/1.x/dg/concepts/input_params.xml
Install vows and test as usual
$ npm install vows $ npm test
The Yandex.Maps API can be freely used by any users who follow the requirements in the following Agreements:
Please note that the Yandex.Maps API cannot be used for fee-based cartographic services or services that restrict third-party access in any other way. Requiring user registration is not considered as restricting access.