Título: librería javascript cakephp 2 Publicado por: Ikku en 17 Mayo 2013, 13:09 pm Hola,
Estoy intentando ejecutar un método con una librería, dentro de la libreria tengo esto: var map; var ajaxRequest; var plotlist; var plotlayers=[]; function initmap() { // set up the map map = new L.Map('map'); // create the tile layer with correct attribution var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'; var osmAttrib='Map data © OpenStreetMap contributors'; var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 12, attribution: osmAttrib}); // start the map in South-East England map.setView(new L.LatLng(51.3, 0.7),9); map.addLayer(osm); } y en cake primero la incluyo con: echo $this->Html->script('leaflet'); echo $this->Html->script('leafletembed'); a continuación creo un div donde se ejecutará la función: <div id="map"></div> e intento ejecutarlo, pero no me encuentra el método, ¿Que estoy haciendo mal? echo $this->Js->initmap(); La librería esta en /app/webroot/js |