I'm developing a campus navigation app.
I have an image which displays building on the campus.
I want draw a route from the user location to destination building the use wants to go.
Wondering how to draw a route on static custom image.
Been searching on internet but cannot find any clue how to develop.
All documentation on internet are about drawing route on Google map.
any hint will be much much appreciated.
You'll have to manually collect latitude and longitude information for each of your map image's four corners. You'll also have to manually specify, in terms of co-ordinates on the image, the position of every possible turning point in the building's corridors, stairs etc. Then you can get the device's current latitude and longitude (see the Location Awareness Programming Guide), translate it into a position on your image, and overlay a transparent view with a red line on it stopping at each of your manually collected waypoints. There remains the graph theory problem of finding the shortest route through the network of waypoints. I suggest the A* algorithm.
Related
There is a webpage I am looking at that displays a Google Map (via javascript), but certain areas of the map have an overlay (textures appear different than the rest of the map, etc.). From what I can gather, this is done on the webpage via a getTileURL function, which depends on the zoom level and current coordinate.
I am interested in portraying this same overlay in my iPhone application, which currently has a mapView set up. Is there anyway to implement the same sort of getTile function in objective-c for a mapView?
If someone could please provide some sample code or point me in the right direction I would greatly appreciate it. Thank you.
My client would like me to implement geolocation in a mobile application. He want me to use a map which is quite deformed (definitely not a google-like map). Is it an easy way to transform the GPS coordinates into the coordinates on that deformed map?
I get the coordinates (X0,Y0) from the GPS -> I need the location on my client's map (X1,Y1)
Dude, you should try http://trimaps.com. It does exactly what you are looking for!
You need to know the mapping from the client map to real world co-ordinates. Either ask your client, or perhaps you could overlay it on a google map of the same area in photoshop and work out how much you need to stretch it by in each dimension, this might get you close enough if the distortion is linear.
I am making an iPhone app for a local college. I am currently trying to take a drawn map of the campus and put pin annotations on it. I also want to be able to show the users current location on this map image. Right now I just have a UIImageView inside of a UIScrollView. It can currently scroll and zoom in/out. How would I go about accomplishing this? I have searched everywhere for an answer and can't seem to find a solution (or have overlooked it). Am I going in the right direction? Thanks for your help.
You would have to come up with a function to translate latitude and longitude into pixel offsets in the image. Assuming the campus is relatively small compared to the Earth (so you can ignore the planet's curvature), this should be a simple matter of determining the coordinates of the four corners of the image and interpolating.
I can see with iOS4 you can now tile an image on google maps (Been looking at the TileMap example from apple). This is great as this is what I want to do, but from what I can see I need to know the GEO reference of the image so I can raster the images with the appropriate zoom levels, etc. What I have is an artist image, which is a map of a specific area and I want to overlay this image on google maps.
Am I missing something here, but can this be done with a none standard map and having different zoom levels?
The main reason why I need to use google maps is because of the GPS functionality, so the user will know where they currently are on the map.
Georeferencing is how you "pin" your image to the world. It is a tricky process, but not too hard once you dig into it.
You've already found the TileMap example code - that is the first step.
Next, check out MapTiler.org. There you will find links and some binaries that you can use to process your image into georeferenced tiles.
If you don't know the lat/long coordinates for your image, you can use Google Earth to interactively overlay the image onto the map, and then copy the coordinates out.
Good luck!
In an AR app whereby you annotate objects or buildings in a camera view, I want to understand the role, that different hardware bits - on the phone (iPhone/Android) - play to achieve the AR effect. Please elaborate more on the following:
Camera: provides the 2D view of reality.
GPS: provides the longitude,latitude of the device.
Compass: direction with respect to magnetic north.
Accelerometer: (does it have a role?)
Altimeter: (does it have a role?)
An example: if the camera view is showing the New York skyline, how does the information from the hardware listed above help me to annotate the view ? Assuming I have the longitude & latitude for the Chrysler building and it is visible in my camera view, how does one calculate with accuracy where to annotate the name on the 2D picture ? I know that given 2 pairs of (longitude,latitude), you can calculate the distance between the points.
use the camera to get the field of view.
use the compass to determine the direction the device is oriented in. The direction determines the set of objects that fall into the field view and need to be reflected with AR adorners.
use the GPS to determine the distance between your location and each object. The distance is usually reflected in the size of the AR adorner you show for that object or in the number of details you show.
use the accelerometer to determine the horizon of the view (a 3-way accelerometer sensitive enough to measure the gravity force). The horizon can be combined with the object altitude to position the AR adorners properly vertically.
use the altimeter for added precision of vertical positioning.
if you have a detailed terrain/buildings information, you can also use the altimeter to determine line of visibility to the various objects and clip out (or partially) the AR adorners for partially obscured or invisible objects.
if the AR device is moving, use the accelerometers to determine the speed and do some either throttling of the number of objects downloaded per view or smart pre-fetching of the objects that will come into view to optimize for the speed of view changes.
I will leave the details of calculating all this data from the devices as an exercise to you. :-)