Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icon edit code in sandbox #1129

Merged

Conversation

AlitaBernachot
Copy link
Contributor

@AlitaBernachot AlitaBernachot commented Dec 6, 2023

Updated example pages

  • Add an icon to open and edit the example in code sandbox
  • Removed ION token (provoking an error overlay layer in code sandbox)
  • examples now in html5
  • removed jquery (except for popup overlay)
  • vite is used in codesandbox (instead of parcel)

image
image

  • buildings.html
  • customProj.html
  • exports.html
  • fillstyle.html
  • groundvectors.html
  • icon-position.html
  • image-static.html
  • imageWMS.html
  • kml.html => 🛑 Example not event working in standalone page, kml not available
  • layer-group.html => 🛑 Example not event working in standalone page
  • lazy.html
  • main.html
  • mvt.html
  • overlay.html
  • print.html
  • rastersync.html => 🛑 Example not event working in standalone page : Error for https://api.tiles.mapbox.com/v4/mapbox.world-borders-light.json?
  • rotate.html
  • selection.html => 🛑
  • sidebyside.html
  • synthvectors.html
  • tracking.html
  • vectors.html
  • wmts.html

@AlitaBernachot AlitaBernachot marked this pull request as draft December 6, 2023 10:28
@AlitaBernachot AlitaBernachot force-pushed the icon-edit-code-in-sandbox-vite branch from ef6a477 to b76a0c8 Compare July 4, 2024 12:48
@AlitaBernachot AlitaBernachot force-pushed the icon-edit-code-in-sandbox-vite branch 2 times, most recently from be7ead8 to 5925d48 Compare September 8, 2024 17:10
@AlitaBernachot AlitaBernachot marked this pull request as ready for review September 8, 2024 17:46
@AlitaBernachot
Copy link
Contributor Author

ping @gberaudo

'cesium': '1.108',
'ol': '8.1.0'
'proj4': '2.11.0',
'cesium': '^1.90.0',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean 1.121.1 ?

examples/3dtiles.js Outdated Show resolved Hide resolved
examples/_code-sandbox.js Outdated Show resolved Hide resolved
examples/_code-sandbox.js Outdated Show resolved Hide resolved
examples/_code-sandbox.js Show resolved Hide resolved
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</html>`;
const parameters = {
template: 'parcel',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vite?

Copy link
Contributor Author

@AlitaBernachot AlitaBernachot Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template: 'parcel', is mandatory, to improve: see what the parcel template does and try to do the same in the codesanbox init to get rid of this line.

image.src = 'data/icon.png';

image.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAwCAYAAABwrHhvAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAACYZJREFUeNqkWGlsVNcV/u5bZvfYDGZxDHFillDcpKFQpaSCplWrNAhoQtQIK4ASqbSJ0iqFVGSVmh+hSWkaCVrSKhSCIjUtSyFuQxMQgVCEgMYsBtxS7LJjY3s84xnP8uatPfe9mbEHz3jjSsfz/O5yvrOf+5hlWciNsQfrXTCsHzNLqBcD7imiW5KBvvkRDxPQNc0yu9NthqLuYW5xfWTRX9v7L2E5AGMP1N/FwPZ4p02cKScqoMcT0HtjsFQFMMyRMxcEQBQhuryAJEJPxKG1dUUND3uiZ9nH+wsAkOQeZomnfHfXzkBnGpmLV6Df7IHeFoelWbYkIwdAh4sChAoXhJAPYsgPweNDprUtZVVIs3tWfnqeL5PsxYb1jHf6+BloT0NpbkX62FXoZ8OwdNM5iDGM1BRWvz/SneVwP1ANNsGCWBHwqVe71tHE4ixO0hQT6uVkBdRr7VAab0A73Un7LEIsQXDLYDa5RkSCh4g/u2QYbQmo/2qHmVAhlLvJMfBI8FcPVeQ1wLzu+7jNjUgC2plOMJlwEVNOjK9gwugdkWvRMGB0JWFGMhADBMznkvSYMpVmGx0ALtljxtMwu1K2vZmXGPvdEFwi6YiVPNtFQaLq2hCRQHbQRJgigxlTIVkiCUjnxgxP3gTc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zxSPPTeQyGnKFD/0/Ebody9XZxUhtsHwHP5ON/fM+GeV3hY2SC8pAkeojniPkIATEtHpqntb/DLLwnVAQhV/tsHYF9YiaFY5X8r09H1e8tLgMooSQVkCAE3kQugd5ZoQjl947glsnqxKmBw6fm62weQy2zEiE3w/1S7Gd5mcg0E6f+gDBAQS7aZN1u6sUiY6E+JdxLzCo8TMUMMqXhO6Qux0IGliHz7L7wtlnmaEe8MPut/fo5Xnly5WOCxnlKQabzRop7pWKIeuMr7c94ea7RP739W/2/SRb8VF2Oe+xpH5MkCGEc0lxqKas/ymYvJ0Waal2M3M4eu7za7Uv+juSaiFg6ASCUQaQJf0CUNSwMlWkxOdBtBm6Xo7vSmM9uyJuTveazzQhPpt3ZY33ZZMVSseL6XsiRmGbMiAPllQ8+SdWuPWGz8X4ABALRql1gTFhStAAAAAElFTkSuQmCC';
// voir si on peut pas corriger ça
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could declare data/icon.png to be a resource.

Comment on lines +159 to +166
// faire à la demande
// définir un objet
// ex Ground vector titlre + urls list
// introduire


// voir
//https://github.com/geoblocks/mapfishprint/tree/main/demo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the status of these comments?

//##REMOVE## Keep this tag, split code here for code sandbox

import {initCodeSandbox} from './_code-sandbox.js';
initCodeSandbox('rawjs/icon-position.js');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we pass data/image-static.png and data/icon.png here to avoid base64-ing them?

//##REMOVE## Keep this tag, split code here for code sandbox

import {initCodeSandbox} from './_code-sandbox.js';
initCodeSandbox('rawjs/image-static.js');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we pass data/image-static.png as resource?

@@ -43,8 +42,12 @@ const ol3d = new OLCesium({
return Cesium.JulianDate.now();
}
});
const scene = ol3d.getCesiumScene();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we remove the terrain?

@gberaudo gberaudo force-pushed the icon-edit-code-in-sandbox-vite branch from d2aa8c2 to 7a796e3 Compare October 4, 2024 14:41
Copy link
Member

@gberaudo gberaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the hard work @AlitaBernachot , @vuilleumierc !

@gberaudo gberaudo merged commit 398ed48 into openlayers:master Oct 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants