I'm looking to implement a widget that shows a floorplan with a custom image. It needs to have markers that show specific points on the plan, and the markers should pan and zoom with the floorplan so they remain in the same position relative to the plan. Imagine a normal map with markers, but I want to show a floorplan image instead of map data.
I've seen this video which uses a GridView:
https://www.youtube.com/watch?v=RZMqaHSs6CM however I don't think it's the best solution for my scenario, as my floorplan images may have different numbers of markers that won't fit in to the grid resolution/dimensions.
Any ideas which widgets/libraries would help me achieve this?
Please let me know if you want more clarity on my goal
Thanks!
Related
I am new to Leaflet and I want to create a raster and add it to my map. The raster is inside inside a polygon, which means I have many polygons (squares). Currently, I am adding just squares, but this makes everything very slow. It should look like this:
.
I also want to display a popup when hovering over a square with some information related to the square.
What I just tried:
I tried to use the GridLayer class for this but it seems I can mask it so that it just shows only specific squares.
There a various plugins but I do not really understand what they are doing
Has anyone an idea how this can be implemented?
Thank you
Leaflet framework seems like perfect solution, however it is using tiles to zoom. I want to source a single file and have it fit to window and zoom based on image being much larger than container.
I cannot find anywhere to disable tile feature. If I did would it break zoom functionality?
Welcome to SO!
Sounds like you overlooked Leaflet Image Overlay.
There is also a tutorial, although you may not need the CRS.Simple part.
I am wanting to layer multiple image overlays over each other on a map (minimum will be 3, maximum 10). These are weather radar images with each image being a higher elevation in the storm. I have attached a screenshot. Just imagine several layers over that image in the same spot.
I am hoping there's an easy image style like "HeightAboveGround" or something like that that will let me do this.
If this is possible, is there also a way to tilt/rotate image overlays? This would be such a nice feature in the map.
I am wanting to layer multiple image overlays over each other...with each image being a higher elevation in the storm.
There is no way to render image overlays at any height other than zero.
If this is possible, is there also a way to tilt/rotate image overlays?
If by "tilt", you mean, along an axis parallel to the ground, such that one end of the image is higher than the other, then there's no way to do that.
If, by "rotate" you mean, along an axis perpendicular to the ground, so that the image no longer aligns with north, then there's no way to do that either.
Sorry this couldn't be more helpful. :) If 3D is important to your application, you might want to consider using a true 3D library (as opposed to 2.5D) such as Cesium.
I want to color the country on selection of the country from a tableView. Can you help me please?
Considering your case, let me give you a heads up that this would require edge detection (so if you haven't done that before, it will take a LONG time), though not lots of it and the following is just one way of approaching this problem:
1) Take out an image context from the map you have.
2) Apply relevant edge detection algorithms in the area you want and use a bright color to differentiate. Note that this way, the inside would not be colored and I can't tell you for sure if that's possible or not.
3) Add that context as a subView on top of the map.
Also take a look at the Quartz 2D programming guide for more tips.
I would suggest something different, though. Keep pre-stored images for all the possibilities and just put a UIImageView with that as its image in front of the map - this will save you a lot of headache.
I have a custom map image of an area.. There are about 9 regions and the number of distinct lines needed is only 11 (based on all possible routes).
What is the best way to draw a route on the map?
The brute force/hacky way is to create static images of every route possible- insane as it amounts to over a million images. Another way is to have layered images with the lines as images on top of the map (is this possible? Would zooming mess it up?)... Any other suggestions to tackle this? I could programmatically draw lines on top of the map but would it be responsive to zooming and such?
Note: The map image is a vectored image (svg) and does not contain GPS coordinates
Thank you!
You'll probably want to check out coreGraphics, it's perfectly suited for this task. Zooming and all.