Marker clipped/hidden in OL3 - javascript

I'm using icon markers to display rotatable historical maps atop an OL3 layer.
Unfortunately, when I zoom in, the marker will be suddenly hidden if the southern or eastern edge goes out of the view.
Is there any way keep it visible until the whole image is off-screen?

Related

Draw a polygon (preferably rectangle) on Custom Overlays (Microsoft.Maps.CustomOverlay) in Bing Maps v8

On Bing Maps v8 Is it possible to draw a Polygon (preferably rectangle) on Custom Overlay (Microsoft.Maps.CustomOverlay).
I have been able to render Images (as pushpins) on Custom Overlays using Canvas Layer example given in the link
https://bingmapsv8samples.azurewebsites.net/#Canvas%20Layer
I want to draw a rectangle on Top of this Canvas Layer.
Polygon's are rendered within the base map canvas. As such changing the zIndex such that custom overlays are below polygons would result in the overlay being behind the base map and not visible. It is not possible to put custom overlays between the base map and polygons at this time.
That said, if you are using the drawing tools, it uses a separate canvas when drawing/editing which is above custom overlays. If you are simply drawing a polygon/rectangle and then doing a search with it, that would work, but the final polygon would end up behind the overlay as soon as you leave edit mode.
However, polygons should always be rendered behind pushpins This is standard practice in all mapping platforms.

LeafletJS handle markers on continuous map

I am seeing one problem with the LeafletJS map that the map is continous (infinite) to East and West. Howerver, it does not handle marker positions right. When I set a marker and focus on the marker I for sure see it in the right place. But when I rotate the map 1x around it's axis and arrive at the very same position, the marker is not there.
This is a problem when someone in Los Angeles for instance pans west to see his marker in Sydney, Australia, the marker does not appear. He has to pan east all the way to see the marker. Any solution to this?
Enable the worldCopyJump option when you are creating your map.
worldCopyJump
Boolean false
With this option enabled, the map tracks when you pan to another "copy" of the world and seamlessly jumps to the original one so that all overlays like markers and vector layers are still visible.

Prevent rerender / redrawing of a leafletjs map

I am building an indoor heatmap with the awesome leafletjs library. On top of that I am using heatmap.js for the heatmap itself.
If I zoom in, the heatmap as well as the basemap (leaflet GeoJSON layer) seem to be rerendered and thus aren't visible during the zoom animation.
I am trying to get a gradient, smooth zoom animation.
Is there any way to let every layer be visible during a zoom animation?
Thanks in advance for any support on this!

KMZ points displaying in inaccurate positions at small scale in Google Maps

I am having issues displaying points from KMZ files accurately at small scales when the map is zoomed out (e.g. zoom: 5).
Some of the points from the Farmers Markets KMZ layer for example start out in the water and then as you zoom in the points moves onto land and becomes more accurate as you zoom into the map. The points are only displayed in their accurate positions when zoomed in closely at a certain extent.
How can the points be displayed more accurately at small scale when the map is zoomed out? Thanks!
I've seen similar behavior in regular API markers when a custom icon is placed, that the marker appears to be "bumped" off to a side when zooming out. This effect has to do with where the marker image is anchored. By default, it looks like the KML markers are anchored at the center bottom of the image.
Notice that the farmers' market PNG image below has a lot of blank "padding". Since the anchor to the map is at the bottom of the image, when zooming out, the red dot will appear to move north.
I found a page saying icons need to be at least 32x32 so the padding should stay there.
To change the anchoring location, add the <hotspot> option to the IconStyle, as described here, for example, to the center of the image:
<hotSpot x="0.5" y="0.5" xunits="fraction" yunits="fraction">

Constraint visible and pann-able area of google maps

I'm displaying a custom layer on top of the standard google map (v3). Now the users can pan out of the extents of my custom layer.
Is it possible to constrain the viewable area to a square given by the top-left and bottom right coordinates?
What you could do is prevent the user being able to pan the map at all. Set draggable:false in the mapOptions, and perhaps remove the pan control as well - panControl:false
Another idea; you could allow the user to drag/pan the map, but then if they move it outwith your bounds, you could call the panToBounds function on the map to move it back to where you want it.

Categories