Setting the CRS for non-geographical svg map - leaflet

I'm trying to show a custom non-geographical map with CRS.simple as explained here:
In a CRS.Simple, one horizontal map unit is mapped to one horizontal
pixel, and idem with vertical
However, I wish to use an SVG vector image as an overlay, but I don't get how the map unit is decided in this case, since the vector images don't really have a resolution?
Also, how could set the CRS origin's location to a specific point?
Thanks for helping

Related

Spacing between heatmap point

I tried to customise leaflet heatmap.js to render rectangles to generate a heatmap. I was doing good so far. But, there are spacing in between rectangles that I can't get rid of. As in the picture.
heatmap
Solutions that I tried: turn off antialiasing, add offset. While adding offset remove the space, it creates an area with "blended color" which I don't want to have. I wonder if there is a solution to remove the gap or remove the blending color in heatmap.js.
Thanks and regards.
Turn out it is precision problem of the leaflet latlong to screen coordinate function. I have fixed it by recalculate the coordinate.

Z Offset for Mapbox labels

I have a 5-floor indoor building on top of a Streets Style map in Mapbox Studio Style editor. It looks almost ok in 3D, all extruded poygons and lines are at the right base height and height with about 3m space betwee the floors.
But I cannot find any base hieght or z-offset option for Symbol types in order to show labels correctly at the place where they should be in 3D. Is there a z offset for labels at all?
It's not currently possible, but has been discussed as a possible enhancement: https://github.com/mapbox/mapbox-gl-js/issues/3993

Is there a way to check for markers whos icons intersect / overlap visibly?

I am building a map and want to use the leaflet markercluster plugin to cluster any markers that intersect visibly (the icons overlap each other). I can't seem to figure out a way to check whether the markers icons intersect though.
I've examined the documentation and the Marker objects. The marker object has no "bounds" object and has no function to return the bounds of the icon.
Yes, it's possible.
This is implemented in some Leaflet plugins, like Leaflet.LayerGroup.Collision - the technique involves fetching the computed style of each icon's HTML element to get the actual size in CSS pixels, offset those numbers by the relative pixel position of the marker's LatLng, and using a rtree data structure to speed up the calculation of the overlaps. Do have a look at the complete source for LayerGroup.Collision plugin.
Note that this technique only takes into account the rectangular bounding boxes of the icons; while it would be possible to check for the individual transparent pixels, that would involve more complex data structures and a different technique to fetch the opacity of each pixel.

IOS - Calculating tiles to display in a MapRect when

I have tried the solution on this but get 2 errors when I run the build. First "MAX_ZOOM undeclared" and Implicit declaraation of function'zoomScaleToZoomLevel'
I'm new to xCode, any help? need to fix tile zooming.
Thanks Ken
Calculating tiles to display in a MapRect when "over-zoomed" beyond the overlay tile set
MAX_ZOOM is a constant - you need to define it someplace in your code to match the number of zoom levels in your tile set.

Using custom point markers in Matlab Mapping Toolbox

I'm trying to find out if it's possible to create custom point markers (from some image files) in Matlab with Mapping Toolbox.
So far, I didn't find anything about this in their documentation. Online searches only yielded:
No. The marker shapes are hard-coded and you cannot add new ones. If you want a custom
marker, then at each point you want the marker, you will have to use line() or
equivalent to draw the marker or image() or equivalent to draw in an image.
(Source: http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/4fe4e31f191f7080)
PS: I also cross-posted this to https://gis.stackexchange.com/questions/3413/using-custom-point-markers-in-matlab-mapping-toolbox
How about this? Image Markers: Plots an image and superimposes a binary image as a colored marker.