I have an app where I am showing map where I will be showing the driver area allocated to him.
Client want this area will be highlighted with some color.
Sample can be as below.
Any idea how this can be done?
What I was planning to do is having images for different regions and show image for respective area.
However I just wanted to check if this can be done using MapKit that we already have, I don't want to go with images.
More info on this would be appreciated.
I didn't thought this would be so easy...
Below link will do the trick I was looking for...
http://www.shawngrimes.me/2011/04/adding-polygon-map-overlays/
Something you may want to try for performance reasons is to use TileMill to parse the source data (KML, SHP, etc.) and render out raster tiles, possibly with alpha transparency so that they can be used as a true overlay. Then, you could use those tiles in MapKit or something like Mapbox.
you can see HTML "map" tag with "area":
http://www.w3schools.com/tags/tag_area.asp
Related
I need some directions (tutorials, examples, etc) to help me to figure out how I could, from a floor plan (ex: png file for now), place some points/icons to different locations and be able to zoom in/out, drag and rotate.
In fact, a bit like google map, with only basic stuffs.
Thanks
Take a look at the Grid List Demo in Flutter Gallery:
https://github.com/flutter/flutter/blob/master/examples/flutter_gallery/lib/demo/material/grid_list_demo.dart
It features an Image viewer with zoom and pan support.
(You can also find the Gallery on the Play Store)
Instead of using a simple image, use a Stack that overlays Positioned widgets over your image.
I need to use a PNG as custom map of an indoor place. I don't need navigation but some places should be clickable like what we have in built in map. In android this is possible with MapView but I didn't find anything for iOS to do that. Can someone help me out how to start and do this?
A while back Apple added the ability to provide custom map overlay tiles. It isn't as simple as providing a PNG. You will need to create a database of map tiles at different scales, following a specific naming convention, and then provide a tiled map overlay.
I suggest looking at this blog post:
Custom and Offline Maps Using Overlay Tiles from VIGGIOSOFT
It goes into quite a bit of detail on what's required.
I'm trying to create a map of the office I'm working at. I have a high resolution image, and would like to autorotate it in the direction the user is heading, allowing the user to navigate around the map. I thought this could be accomplished using CoreMotion/CoreLocation and a UIScrollView, but this seems like there's some work involved.
So I'm wondering if there are easier solutions for combining a custom map and direction/position on that map - can MapKit handle this for me? Are there other frameworks that can help me show a local 2D map with compass orientation on it?
You can convert your high-res image into map tiles easily with TileMill.
You should use some custom tiles with MKTileOverlay which only display at a very high zoom level (like z 18 or whatever). I suggest you take a look over at NSHipster and read what they have about it:
http://nshipster.com/mktileoverlay-mkmapsnapshotter-mkdirections/
*Disclaimer: I haven't tried this myself, came across the NSHipster article while searching for solutions to my own problems.
Is there any way to show only the pure map in ios? Without any text, label or annotation.
Sample iOS Map
For ex, in that picture there is a lot of texts, labels..
Somehow... From iOS7 you can provide your own tiles, but you lose map kit original tiles.
Mattt has written an interesting post on NSHipster, you should check it
Another option is to try the Mapbox tools to allow full map customization.
I want to replace the particular color of an image with other user selected color. While replacing color of image, I want to maintain the gradient effect of that original color. for example see the attached images.
I have tried to do so with CoreGraphics & I got success to replace color. But the replacing color do not maintain the gradient effect of the original color in the image.
Can someone help me on this? Is the CoreGraphics is right way to do this?
Thanks in advance.
After some struggling almost with the same problem (but with NSImage), made a category for replacing colors in NSImage which uses ColorCube CIFilter.
https://github.com/braginets/NSImage-replace-color
inspired by this code for UIImage (also uses CIColorCube):
https://github.com/vhbit/ColorCubeSample
I do a lot of color transfer/blend/replacement/swapping between images in my projects and have found the following publications very useful, both by Erik Reinhard:
Color Transfer Between Images
Real-Time Color Blending of Rendered and Captured Video
Unfortunately I can't post any source code (or images) right now because the results are being submitted to an upcoming conference, but I have implemented variations of the above algorithms with very pleasing results. I'm sure with some tweaks (and a bit of patience) you might be able to get what you're after!
EDIT:
Furthermore, the real challenge will lie in separating the different picture elements (e.g. isolating the wall). This is not unlike Photoshop's magic wand tool which obviously requires a lot of processing power and complex algorithms (and is still not perfect).