Adding my map


#1

Hi,

I would like to connect another map. As I understand it - the connection is in the file: applicatio /helpers/map.php

For example, Bing road - connected as follows:

$ Layer = new stdClass ();

$layer->active = TRUE;

$layer->name = ‘bing_road’;

$layer->openlayers = “Bing”;

$layer->title = ‘Bing-Road’;

$layer->description = ‘Bing Road Maps’;

$layer->api_signup = ‘https://www.bingmapsportal.com/’;

$layer->api_url = ‘’;

$layer->data = array(

‘name’ => ‘Bing-Road’,

‘baselayer’ => TRUE,

‘key’ => Kohana::config(‘settings.api_live’),

‘type’ => ‘Road’,

);

$layers[$layer->name] = $layer;

The documentation of my card, simple example of such a card:

  1. In the head section of the page to connect the CSS files Leaflet

link rel=“stylesheet” href=“http://cdn.leafletjs.com/leaflet-0.4.4/leaflet.css”>

 

  1. Enable loading of the “engine”, preferably before the closing body.

  1. Determine the div that will display card, make sure the item needs to have a width and height.

You are ready to initialize the card.

Map Initialization

To show our TMS initialize card as follows:

var map = new L.Map(‘map’, { center: new L.LatLng(50.455002, 30.511284), zoom: 9, layers : [ new L.TileLayer(‘http://tms{s}.visicom.ua/1.0.3/world_ru/{z}/{x}/{y}.png’,{ maxZoom: 18, tms : true, attribution : ‘Данные компании © Визиком’, subdomains : ‘123’ }) ] }); });

The key to this map I have is the actual question:

How to set all the parameters to the map is displayed? All my attempts end in a blank card.

 


#2

Thanks Chris!