Giter VIP home page Giter VIP logo

Comments (6)

ghettovoice avatar ghettovoice commented on June 2, 2024

Hello @chgad ,
you are right, it seems that map components are loaded but images from OSM layer is missing.
Do you see some errors in browser console, nodejs console ?
and also do you see requests on browser network tab to openstreet map tiles? something like this https://a.tile.openstreetmap.org/2/1/2.png

from vuelayers.

chgad avatar chgad commented on June 2, 2024

Okok... i don't know why but it seems like i didn't pay attention to the Errors in the console.

I had errors showing "sourceProjection is null" which was caused by an ol@v7 install. Downgrading to ol@v6 fixed everything.

Now the XKCD Demo works. But the geo-map demo is still not showing the map. Now without any Error messages and no requests fetching map tiles.

I tried copying this map demo and it works just fine (BUG: Implementing this map and the XKCD demo alongside each other seems to work as long as you do not scroll the normal map. As soon as you drag or scroll the map, the XKCD map disappears.)

In addition to that matter: It would be great to add a "you need to install ol manually" statement to the docs.

from vuelayers.

ghettovoice avatar ghettovoice commented on June 2, 2024

I tried copying this map demo and it works just fine (BUG: Implementing this map and the XKCD demo alongside each other seems to work as long as you do not scroll the normal map. As soon as you drag or scroll the map, the XKCD map disappears.)

XKCD example uses custom non-geographic projection. So, if you share it's view with another map in EPSG projection, after dragging normal geo map, XKCD map just moves somewhere far away of image. You can check coordinates, view extents of both maps in Vue dev.

In addition to that matter: It would be great to add a "you need to install ol manually" statement to the docs.

ol@6 is among vuelayers dependencies, so if you didn't manually install ol package before vuelayers, npm should install vuelayers and all it's dependencies with correct versions. Current stable vuelayers based on ol@6.

Now the XKCD Demo works. But the geo-map demo is still not showing the map. Now without any Error messages and no requests fetching map tiles.

Thats interesting, OSM layer works on one map and don't work on another. What do you see in Vue devtool's components tree? Do you see <VlLayerTile> -> <VlSourceOsm> nodes in the <VlMap> node?

from vuelayers.

chgad avatar chgad commented on June 2, 2024

XKCD example uses custom non-geographic projection. So, if you share it's view with another map in EPSG projection, after dragging normal geo map, XKCD map just moves somewhere far away of image. You can check coordinates, view extents of both maps in Vue dev.

So in general all maps rendered are moved simultaneously ?

Thats interesting, OSM layer works on one map and don't work on another. What do you see in Vue devtool's components tree? Do you see -> nodes in the node?

This is what the VueDevTool shows me:

Screenshot from 2022-12-06 14-47-42

As i inspected both of the maps i recognized that the geo-map has an additional data-projection="EPSG:4326" prop set.

Removing this prop, the map gets render just like the others. Is this maybe a deprecated or fault projection?

EDIT:

I found my mistake. Since i was using the XKCD demo, which defines a custom projection and then center: [size[0] / 2, size[1] / 2] in the data object the map was, i guess, simply way outside of the canvas. Defining center: [0, 0] as it is defined in te geo-map demo the map appears as it should.

from vuelayers.

ghettovoice avatar ghettovoice commented on June 2, 2024

So in general all maps rendered are moved simultaneously ?

no, only if you share view between them, i.e. add <VlView ident="qwerty"> to both maps (like in this demo https://vuelayers.github.io/#/docs/component/view?id=ident).

If this is true, then on one side you have a map with view in EPSG:3857 and on the other side image with custom projection.
To show both, I guess, you need to adjust image layers projection (extent) so it will be visible in EPSG:3857.
I have make another demo to show my idea https://jsfiddle.net/ghettovoice/Ln9qr135/377/

from vuelayers.

github-actions avatar github-actions commented on June 2, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from vuelayers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.