can't get phantomjs 1.9 to render Leaflet SVG vector layers to png - phantomjs

I'm building a mapping application using the Leaflet API http://leafletjs.com/.
I would like to use phantomjs to generate static screenshots of maps.
As an example, attempting to render this page:
http://leafletjs.com/examples/geojson-example.html
using
phantomjs examples/rasterize.js http://leafletjs.com/examples/geojson-example.html test.png
results in an image that's missing the SVG overlay. I have tried this using the prebuilt binaries under Windows 7 and Fedora Core 15. In addition, I compiled it from source under Fedora Core 15. All builds on both platforms yielded the same behavior.
Has anyone had success rendering Leaflet maps to PNG using phantomjs?
thanks.

I just ran into the same issue and increasing the timeout (at least to 5000) didn't make SVG overlays appear in the PDF.
It's probably this issue: https://github.com/ariya/phantomjs/issues/11171
Switching to Leaflet master branch fixed the problem for me.

Related

Issue showing images on build and start with Vue and Electron

I am building an app with vue and electron but the only way I it shows the image if I input the full path
src="D:/electron-project/src/assets/logo.png"
if I try src="../assets/logo.png then it builds the image as file://D://img/logo.png and does not load the image.
Tried reading all I could but could not find the answer.
Thanks in advance.

Javafx webkit loading HTML content

I have a javafx application which is loading HTML content using webkit. I have created a stage and a scene and do webEngine.load(html). It works fine. But when I minimize the application and then again maximize it after sometime, the stage shows black screen for 2-3 seconds before loading the html again.
My question is why is this happening and how can I avoid this?
Thanks,
Nitin
You are using very old JavaFX. Can you try with latest version 2.2.21 which can be found here:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
It's cobundled with jdk 7u21, just download and install jdk and you get JavaFX with it.

Sencha 2.0 App file size issue -

I have developed a small Sencha Touch 2.0 app. Here is the url:
http://apps.swarnendude.com/sencha/iphonetest/iphoneTest.html?url=http://apps.innofied.com/sencha/gts
The app works in perfectly fine in Android 2.3, iPad, iPhone, Blackberry Playbook. But the app crashes while I test in Blackberry Torch (OS: 6.0) giving this error:
"The page you requested could not be loaded. It is too large for this device"
The production version of the file sizes are:
sencha-touch.js: 90.5Kb
app-all.js: 401.4Kb
app-all.css: 151.5Kb
Other resources: 10Kb
So, total around 650Kb. I think the sizes can be reduced more but I am not getting any other options. I am using the least css configs in SASS file and in JS too (only which are required). Is there anyone getting the same problem? Any solution?
It seems that you attempted to minimize your app, so in this case, there's not much you could do.
I'm using Blackberry Bold and occasionally see this when I use native browser. But in some cases, Opera Mini and Bolt Browser are good suggestions to pass those errors.

Adobe Air 2.5+ #font-face and the HTMLLoader

Can someone post the proper syntax for using #font-face with the HTMLloader. I'm loading an HTML string directly into the loader and it will render normal CSS, but I can't get it to load the TTF I'm referencing with #font-face.
Turns out that the Adobe only has Adobe Air 1.5 built into it, that was my problem. Using this tutorial, I was able to upgrade to use Adobe Air 2.7 using this tutorial,
http://blog.prevail.co.nz/2011/06/21/overlaying-air2-7-in-flash-cs5/
After upgrading the #font-face started working, but I still didn't like it cause the fonts had no anti-alias smoothing, the fonts render like they would in a browser using web safe fonts.

problem while using tiff and gif format images with UIWebView

I have a web page using css and javascript and also this webpages have tiff and gif images. When i loaded this webpage locally in ipad it is not working as i can only see white page and not my images. But when i moved this folder to one of the server and when i tried to load this website remotely. I got this error:
"_CGImagePluginInitGIFmalformed GIF file (1024 x 748)"
But It is working properly. So i was wondering if there is any problem using the tiff and gif images locally?
Is it possible that there's really a error in the GIF?
If you're able to open the GIF in an other application, try to re-save it. It will probably fix the malformation. If it doesn't work try to save it in an other format. (Try OS X's Preview, it's good for these kind of things...)
The problem was with the javascript files which i moved to the copy Bundle Resources from Compile Sources.