Coder Social home page Coder Social logo

Comments (4)

egeloen avatar egeloen commented on July 17, 2024

If you set the map zoom, there is no call to a setOption method.
Can you paste your code or explain more precisely what are you doing ?

from ivorygooglemapbundle.

tsantos84 avatar tsantos84 commented on July 17, 2024

Hi egeleon,

What I want to do is simply get a new instance of the map and set their zoom option. Nothing beyond this.

I'm trying with this code:

$map = $this->get('ivory_google_map.map');
$map->setOption('zoom', 15);

When I do this, I get this message:

Call to undefined method Ivory\GoogleMapBundle\Model\Map::setOption()

To fix this, I've put this simple method in the class Ivory\GoogleMapBundle\Model\Map and works fine to me.

public function setOption($name, $value)
{
    $this->mapOptions[$name] = $value;
}

from ivorygooglemapbundle.

tsantos84 avatar tsantos84 commented on July 17, 2024

Hi egeleon,

I've found the error. The properly method to set the zoom option is Ivory\GoogleMapBundle\Model\Map::setMapOption() instead of Ivory\GoogleMapBundle\Model\Map::setOption() as discribed on documentation.

You just need to fix the documentation.

Cheers.

from ivorygooglemapbundle.

egeloen avatar egeloen commented on July 17, 2024

I fix the documentation. Sorry for the mistake...

from ivorygooglemapbundle.

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.