Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create map with options #24

Open
goodsw4all opened this issue Jul 31, 2019 · 1 comment
Open

create map with options #24

goodsw4all opened this issue Jul 31, 2019 · 1 comment

Comments

@goodsw4all
Copy link

Hi, @samhattangady

First of all, Thanks for your great work. it helps me a lot.
I just found a problem when creating MAP with options, it did nothing.
I guess the problem is that options in jsObject has single-quote.
So I tried modifying below, it seems to work.
(FYI : I'm not good at javascript and python)

Have a good day

    def _initJs(self):
        jsObject = 'L.map("map"'
        if self.options:
            jsObject += ', {options}'.format(options=self._stringifyForJs(self.options))
        jsObject += ')'
        # Unless remove single quote, options doesn't work
        jsObject = jsObject.replace('\'', '')
        print(jsObject)
        self._createJsObject(jsObject)
@samhattangady
Copy link
Collaborator

Thanks for this. I will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants