Nokia HERE Map using Google Latitude - geolocation

I am trying to parse and add my google latitude KML marker into the Nokia HERE map. It only works locally on my laptop in IE 9, but it doesn't add the marker in Safari 5.7, Chrome 27 (locally or on my web server). Any ideas?
kml.parseKML("http://latitude.google.com/latitude/apps/badge/api?user=-1099057214648547758&type=kml");

If the KML is being loaded successful on some browsers but not others, then this is almost certainly due to the browser in question kindly trying to prevent a cross-scripting domain attack.
You have three options
Host the KML file in the same domain as the JavaScript reading the file - e.g. if you own example.com, the JavaScript should be hosted on example.com and the KML hosted on example.com
set up the KML parser to retrieve the file example.com and use a proxy solution such as this php example to really retrieve the file from elsewhere
Enable CORS on the server hosting the KML file, and load the KML using AJAX followed by the parse() method as shown in this example
If the KML is never loaded successfully, you should check to see whether the file is valid, and indeed whether the HTML displaying the map is syntactically correct.

Related

Access to a PDF File in a http with dinamyc variables

Hello everyone (sorry for bad English), i'm getting crazy with this problem... i'm working on a project with NiFi expecting to download PDF files from a public Goverment page. The main problem it's that the page you request in a web browser shows the correct page like this
Asking the same page in NiFi (also testing in postman) shows that the session has expire, then looking at the HTTPS POST with the development tools in chrome i notice that there are multiple headers that contain dynamic variables
Is there any form to replicate web browser behaviour on NiFi?

All Invalid Random Paths in the URL Return The Normal Web Page Instead of 404 Not Found Page

I have a website:
https://www.includekarabuk.com
For instance this url contains an article:
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php
But when I add invalid path to the existing url, page is still being showed.
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/test123343242314321423423423/
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/sdfdsfdsfsdfdsfsdfsdfsdfsdsdfdsfsdfd/
https://www.includekarabuk.com/kategoriler/genel/Siber-Guvenlikte-Dusuk-Seviye-Aciklik-Nedir.php/132432432/
But because css and javascript file locations will be invalid due to added extra path, page is displayed as broken.
I want to stop this. When the web server receives invalid path as with above, it should respond as 404 not found page coming from web server. How can I do that? I am using Apache web server and php scripting language.
Note: I am not using any MVC framework.

Mathjax not working in browser when hosted on Google Drive

This is first time I'm driving to use Mathjax, the maths is written in LaTeX, it works fine when I open the page locally, but when I host the same page on Google Drive, Mathjax no longer works, I only see the LaTeX code.
Here is the link to the webpage.
https://googledrive.com/host/0B6DfW2X25tuNck9yLTFSX2hiTEE/Group%20challenge%20Topic%206.html
And here is my code.
https://drive.google.com/folderview?id=0B6DfW2X25tuNck9yLTFSX2hiTEE&usp=sharing
I have tried everything, I'm using latest Chrome, so it shouldn't have any issues loading Mathjax
Since Google Drive is using a https:// URL, you need to load all your resources via https as well or you will get a security violation (check the browsers console for these). So that means you need to use an https: URL for MathJax. The MathJax CDN provides an alternate URL for that: https://c328740.ssl.cf1.rackcdn.com/. See the MathJax FAQ for details.

Using Google Maps from a local webpage with Delphi & DCEF

I am using Delphi & the DCEF (Delphi Chromium Embedded Framework) to load a local HTML file into a browser embedded within a form. The HTML file is trying to display a Google Map & has the line -
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=true&v=3.6&client=gme-{mycompanyid}"></script>
but the problem is that the URL sent as the referer to Google APIs is
HTTP://127.0.0.1/mypage.html
We have already authorised our website URLs for our Business Client ID, and we want to use the same Business Client ID for this desktop application.
My question is - how can I get the calls to Google API to use a different referer ? I think its not possible.
Decided not to persue this, a locally hosted HTML file is really a security risk. We are still using the embedded DCEF browser in a Delphi form, but host the HTML file on our corporate webserver. That way the Google API is happy with the referring URL for map requests.
Thank you to all those who replied.

Can Chrome open files (PDF etc) directly in browser for an intranet application?

My ASP.Net MVC app is an intranet app, and in the HTML, I put an anchor link to PDF files that are stored on our network. Chrome does not open these files in the browser if you click on the link, however if you copy the link off the webpage and make a new tab, paste the link in, it will open.
Now, both the app and the files are on the same domain so how can I get PDF to open automatically in a new tab? I have looked at the various Chrome extensions, but they don't seem to work. There must be a way to get local/network based files to open in your intranet using Chrome, please don't say I have to resort to awful Internet Explorer!
Any help much appreciated.
Have you tried to use HTML iframe tag to display the PDF?
Example:
<iframe id="frameID" style="border:1px solid #666CCC" title="PDF in an i-Frame" src="PDFData.pdf" frameborder="1" scrolling="auto" height="1100" width="850" ></iframe>
Out of date for you, but I recently solved this problem on an apache2 server on ubuntu. I believe it's a matter of security from the client browser- so that a webpage can't open client files maliciously
What solution was
mount the network share drive on my web server
html point to pdf inside the mounted drive
(Optional on Apache) use a .htaccess rule to prevent folder indexing (listing all files/folder)
therefore the webpage was opening its own file, not the clients; so firefox/chrome/et al will allow this to happen
The fix should be in your mvc project . Just make sure the action returns FileStreamResult . example:
return new FileStreamResult(new FileStream(filePath, FileMode.Open), MimeMapping.GetMimeMapping(filePath));

Resources