Sign in to follow this  

Can Set Setdataurl() Method Take Absolute Paths

Recommended Posts

Hi I am rendering a map using setDataURL("path to map xml"),

currently when I give a path which a valid URL only then does the Map load.

If I give the path as a disk location , it doesnt work since it just appends this path to the base URL which makes it an invalid URL.

so if the path is /myapp/js/my1.xml - it works as I have my js folder in web-app directory so http://localhost:xxx/myapp/js/my1.xml is valid


if the path is like C:/xmls/my1.xml - it doesnt work since http://localhost:xxx/myapp/C:/xmls/my1.xml is invalid URL.

but since we are deploying a war we want to keep the XML outside the web-app , how do I set the path in setDataURL() method.


Thanks & Regards


Share this post

Link to post
Share on other sites

Hi Priyank,


Thank you for the post.


I'm afraid, starting FusionMaps v3.0.5 loads data from only relative URLs. Absolute URLs are not allowed due to security fix that restricts XSS attacks.


I hope this helps.:)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this