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

scaling ol-overlay point while zooming map in vue3-openlayers #377

Open
bluelemonade opened this issue Aug 24, 2024 · 0 comments
Open

scaling ol-overlay point while zooming map in vue3-openlayers #377

bluelemonade opened this issue Aug 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bluelemonade
Copy link

bluelemonade commented Aug 24, 2024

I position some points on a map via ol-overlay, strangely the points do not scale as intended, they should scale with the zoom of the map.

What settings can I use to scale the points on the map, or do I have to use another feature.

<div class="map-container">
       
        <ol-map style="height:980px" >
            <ol-view ref="viewRef" :center="center" :enableRotation="enablerotation" :rotation="rotation" :zoom="zoom" :maxZoom="maxZoom" :minZoom="minZoom" :projection="projection" :extent="extent" :smoothExtentConstraint="true" :showFullExtent="true" :smoothResolutionConstraint="true" @zoomChanged="onZoomChanged"  @resolutionChanged="onResolutionChanged"/>
           
            
            <ol-overlay :position="pos.pos" positioning="center-center" v-for="pos, index in position" :key="index">
                <template v-slot="slotProps">
                    <div class="marker" :xxx="slotProps" @click="doPoint(pos.targetnr)">{{ pos.targetnr }}</div>
                </template>
            </ol-overlay>


            <ol-image-layer>
              
                <ol-source-image-static :url="imgUrl" :imageSize="size" :imageExtent="imageExtent" :projection="projection"></ol-source-image-static>
            </ol-image-layer>

        </ol-map>

    </div>
@bluelemonade bluelemonade added the bug Something isn't working label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant