Google map is not working
-
Hi Jsreport team!,
Google map is not working.
Please have a look:-
https://playground.jsreport.net/studio/workspace/SyrE5X2Re/5
If I used body onload then it is working but my requirement is to generate multiple google map according to Jason data.So it is not applicable for me.
Please suggest how to make it working without using body onload.Thanks in Advance.
-
hi! you need to use an event in the map instance and also use the phantom printing trigger in order to be able to wait for the map to appear on the page before trying to print the page.
example: https://playground.jsreport.net/studio/workspace/SyrE5X2Re/6
-
Thanks
-
Hi bjrmatos
Now single map is working fine.
But according to my requirement,multiple map have to generate through loop.Then they are not working.
https://playground.jsreport.net/studio/workspace/SyM_Xwi0g/44
Please suggest me how to make it working.Thanks in Advance.
-
hi!, my example was just for giving you an idea on how to make it work in your case, of course you will need to adjust some things in the previous example to fit your case.
i'm giving you another example to better clarify your doubts, hope that it will be sufficient to you to figure it out the rest 😉
example: https://playground.jsreport.net/studio/workspace/rkYn7WaCg/19
-
Hi bjrmatos,
Thanks for reply!
When I implemented it on my end then got following error.
https://rajeev.jsreportonline.net/studio/templates/B1D-P73Re
Please suggest me how to make it working.
Thanks in Advance.Error occured - Error during rendering report: Handlebars is not defined
Stak - ReferenceError: Handlebars is not defined
at Object.eachKey (evalmachine.<anonymous>:10:16)
at Object.eval [as main] (eval at createFunctionContext (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:254:23), <anonymous>:6:91)
at main (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/runtime.js:173:32)
at ret (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/runtime.js:176:12)
at ret (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:525:21)
at /usr/src/app/scripts/handlebarsEngine.js:28:14
at evalmachine.<anonymous>:1:41
at ContextifyScript.Script.runInContext (vm.js:37:29)
at ContextifyScript.Script.runInNewContext (vm.js:43:15)
at Object.exports.runInNewContext (vm.js:74:17)
From previous event:
at /usr/src/app/node_modules/jsreport-core/lib/render/render.js:144:54
at _fulfilled (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:794:54)
at self.promiseDispatch.done (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:823:30)
at Promise.promise.promiseDispatch (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:756:13)
at /usr/src/app/node_modules/listener-collection/node_modules/q/q.js:564:44
at flush (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:110:17)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
-
@RajeevK94037758 hmm i think that
Handlebars
object is not available in jsreportonline.. anyway i have another example that don't use theHandlebars
object, this should work on your jsreportonline account now https://playground.jsreport.net/studio/workspace/rkYn7WaCg/20
-
Hi bjrmatos,
Thanks for reply!
I'm getting same error.
Error occured - Error during rendering report: Handlebars is not defined
Stak - ReferenceError: Handlebars is not defined
at Object.eachKey (evalmachine.<anonymous>:10:16)
at Object.eval [as main] (eval at createFunctionContext (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js:254:23), <anonymous>:6:91)
at main (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/runtime.js:173:32)
at ret (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/runtime.js:176:12)
at ret (/usr/src/app/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:525:21)
at /usr/src/app/scripts/handlebarsEngine.js:28:14
at evalmachine.<anonymous>:1:41
at ContextifyScript.Script.runInContext (vm.js:37:29)
at ContextifyScript.Script.runInNewContext (vm.js:43:15)
at Object.exports.runInNewContext (vm.js:74:17)
From previous event:
at /usr/src/app/node_modules/jsreport-core/lib/render/render.js:144:54
at _fulfilled (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:794:54)
at self.promiseDispatch.done (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:823:30)
at Promise.promise.promiseDispatch (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:756:13)
at /usr/src/app/node_modules/listener-collection/node_modules/q/q.js:564:44
at flush (/usr/src/app/node_modules/listener-collection/node_modules/q/q.js:110:17)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
-
Thanks
Working.
-
Hi bjrmatos,
Is there way to move to next item {{#each }} {{/each}} in the mid of loop then start with next item from mid of loop and when loop finish then again start with next item.
Thanks in Advance.
-
Please have a look
https://playground.jsreport.net/studio/workspace/rkYn7WaCg/28
The comps have 5 items.I want to show 4 item on one page and then show remaining item (1) on second page.Thanks in Advance.
-
@RajeevK94037758 i'm sorry, i can't give you more live examples because the problems described are more related with programming in general that with jsreport knowledge, i suggest you to see the handlebars documentation http://handlebarsjs.com/ , it is easy to achieve what you want with just a condition.
-
Thanks
-
Hi bjrmatos,
I want to show multiple marker in google map.But do know how to store value in hidden fields in template.
I think hidden fields do not have any value so marker is not shown.
Please have a look
https://playground.jsreport.net/studio/workspace/rkYn7WaCg/56
Please suggest me how to make it working.Thanks in Advance.
-
Thanks
Got solution.
-
Hi bjrmatos,
When we run the template then first time google map is not loaded and after that it's working fine.
Please suggest me how to make it working.I followed your link:- https://playground.jsreport.net/studio/workspace/rkYn7WaCg/93.
In place of eachKey I used each because when I used eachKey then design was messed up.One more suggestion:-
{{#each valuation.comps}} How can we get the count of valuation.comps. {{/each}}
Thanks in Advance.
-
Hi bjrmatos,
I have used "{{valuation.comps.length}}" and {{../valuation.comps.length}} but not working for me.
Please provide the syntax to get the count.Thanks in Advance.
-
Hi bjrmatos,
Got solution of "How can we get the count of valuation.comps."
But still struggling with:-
When we run the template first time google map is not loaded and after that it's working fine.
Please suggest me how to make it working.I followed your link:- https://playground.jsreport.net/studio/workspace/rkYn7WaCg/93.
In place of eachKey I used each because when I used eachKey then design was messed up.Thanks in Advance.
-
Hi,
I have created google map and it's working fine but some time map is being generated but the map layers are getting overlaid.
When download it in html format then it look good but overlaid in pdf format
Please have a look
https://playground.jsreport.net/studio/workspace/rkYn7WaCg/209
Please suggest.Thanks in Advance.