CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

use map with custom images

by assapan » 22 Feb 2019 16:37

be carrefull , there is a CORS error if you make reference to an other url then the current one !!!
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by FredT » 26 Feb 2019 17:35

Hi,

I restarted testing the MapQuery component, but this time putting my images locally:
In the file OpenLayers.min.js I have put this time:
http://127.0.0.1:8888/MapLame/${z}/${x}/${y}.png

Then I created an OSM Layer:
Layer: = IWCGJQMapQuery.MapQueryOptions.Layers.Add;
Layer.LayerType: = mqltOSM;

And here I come to see my tiles. (With errors: I have a pink band that appears above my image among other things, but I have the impression that I advance)

However when I want to load my tiles from a server I indeed CORS error:
Access to image at 'http: //myserver/MapLame/1/0/1.png' from origin 'http://127.0.0.1:8888' has been blocked by CORS policy: No 'Access-Control-Allow-Origin header is present on the requested resource.

Why in localhost it works and not on a server?

When I look on the net what can cause a CORS error, I get that because I want to access data from one domain from another domain. Which is not the case. Moreover we are in a WorkGroup, not in a Domain. I do not understand what this error means !

Thank
FredT
 
Posts: 28
Joined: 28 Jan 2019 15:10

by assapan » 26 Feb 2019 17:38

Hi,
you must the tile server and application on same url
Want to visit Ardeche http://leclosdelarc.fr/index.php
The Pont d’Arc Cavern http://en.cavernedupontdarc.fr
Image
User avatar
assapan
 
Posts: 600
Joined: 16 Dec 2013 12:04
Location: France

by riyasathe » 25 Mar 2019 10:08

Excellent thread! I got useful information from here. Thank you!
riyasathe
 
Posts: 1
Joined: 25 Mar 2019 09:23

Previous

Return to JQGMap

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.