Giter Site home page Giter Site logo

Comments (8)

elesdoar avatar elesdoar commented on May 22, 2024 1

Please check: http://angular-ui.github.io/ui-leaflet/examples/0000-viewer.html#/basic/custom-parameters-example

Assign a tileLayer param as:

app.controller('BasicCustomParametersController', [ '$scope', function($scope) {
  angular.extend($scope, {
    london: {
      lat: 51.505,
      lng: -0.09,
      zoom: 8
    },
    defaults: {
      // check it
      tileLayer: "http://{s}.tile.openstreetmap.org/cycle/{z}/{x}/{y}.png",
      zoomControlPosition: 'topright',
      tileLayerOptions: {
        opacity: 0.9,
        detectRetina: true,
        reuseTiles: true,
      },
      scrollWheelZoom: false
    }
  });
}]);

from ui-leaflet.

nmccready avatar nmccready commented on May 22, 2024

From @tombatossals on January 17, 2015 13:14

Hi @mbmerrill , sorry I haven't used Ionic framework, but I can assure you this problem is not related with this directive, there's no configuration to look for local files.

Seems some problem with Ionic framework, if you post some example (jsfiddle) I can take a look at it.

from ui-leaflet.

nmccready avatar nmccready commented on May 22, 2024

From @pmusaraj on January 27, 2015 0:20

I'm currently using this directive with Ionic, and I haven't run into this issue. The map loads the base layer from the web, same as on a browser, on the mobile device, not from a file:// call. You should try to find out why it's trying to load from a file...

from ui-leaflet.

nmccready avatar nmccready commented on May 22, 2024

From @bwasnie1 on January 29, 2015 15:3

@mbmerrill It's because all urls in the directive are called like '//..' and not 'http://..'. I mentioned this aswell as I updated the directive to the latest version.

But I don't know yet, why ionic behaves like that.

from ui-leaflet.

jlanio avatar jlanio commented on May 22, 2024

I have identical error using electron.
as

from ui-leaflet.

jlanio avatar jlanio commented on May 22, 2024

Unfortunately the error persists. @elesdoar

from ui-leaflet.

elesdoar avatar elesdoar commented on May 22, 2024

@jlanio, Are you using defaults attribute in the directive?

<body ng-controller="BasicCustomParametersController">
  <leaflet lf-center="london" defaults="defaults" width="100%" height="480px"></leaflet>
  <h1>Using custom default parameters</h1>
</body>

from ui-leaflet.

jlanio avatar jlanio commented on May 22, 2024

@elesdoar

@jlanio, Are you using defaults attribute in the directive?

Exatly

from ui-leaflet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.