google map link with marker (on iphone & android) - iphone

I've tried to open Google Map application on iphone & android. From iPhone developer reference website I am able to open the native google map from link.
http://maps.google.com/maps?ll=11.5558762589,104.921697935&z=15
However, I have trouble with adding a marker into the map. As in google static map, we can add markers into map. I wonder if we can do the same to google map link.

Hey Borey
You can add markers. But it has to be google's own preset marker.
Try this link :
http://maps.google.com/?q=5.352135,100.299683&z=17
Use q instead of ll and I think it will work.
Problems I saw:
1) Cannot choose your own marker
2) Cannot remove that 'additional marker' that tells you what's around that area.
I guess, that's the next best thing for you? For your info, I am using it too as I lack other choices.

The only way I am aware of for doing this is to use the My Maps feature of google maps. You can create a public map in My Maps. Add a marker using the toolbar in the map, then use the link button on the top right to get the URL of your public map.
Not sure how this looks on a mobile device, but I assume that it works.
Edit
Ok. So my assumption was incorrect. I tried this out on Android and iPhone and got the following results:
iPhone - Switches out to the maps application (no option to view in the browser), displays the correct region, but no markers.
Android - Gives you the option of viewing the URL in the browser or in maps. If you view in the browser, you get the correct region, but no markers.
Android - If you view on the maps application, you get the correct region and the markers.
So basically not very useful to you. When I have done this in my mobile web apps (not native), I have used static maps. You give up the dynamic functionality, but you get lots of flexibility with what gets rendered on the map.

Related

Can you put a spot on a map, and then press that spot to open up a new page on Apple Watch

I have tried to do this but can not seem to get it to work. I noticed even the standard map in Apple doesn't let you do this. Is it even possible?
My experience with the map is, that is is not interactive. You can add a spot, but not react on user input. If the user taps on the map the built in watch kit map app will be opened.

Show iOS map types w/ mapbox iOS SDK (routeme)

Wondering if its possible to show iOS map types with the MapBox iOS SDK.
I.E. if I use and MKMapView I can select from standard, satellite and hybrid iOS map types. I would also like to add Open Street Map as an option. Of course I cannot user MKMapView to do that. I can use RMMapView to show an OSM map, but can it show an iOS map?
Biggest reason for this is I would like to stick with one interface. I.E. if I add a bunch of markers to my MKMapView and the user switches to the RMMapView I would have to create RM markers and add them to the RMMapView. This creates a nighrmare when the user creates markers on the different maps and then switches back and forth.
You can't show an "iOS map", which is really an MKMapView, inside of Route-Me/Mapbox. They are designed as peers not meant to be used together.

how to draw route from userlocation to some pin in iphone sdk?

I am implementing map based application in iPhone sdk. I want to give functionality in map view like Google maps directoins. means is at some location from that he selects one pin from multiple pins from MKPinAnnotationView. is it possible that user can get direction from his current location to selected pin location in MapView? user can select any aanonations from that he can get directions in some way of line to his current location to pin location. i have get some idea from here
but this all was some static data you can download this example.
here also apple example. but this example is only for track & draw line for user movement.
is it possible that user can get direction from his current location to selected pin location in MapView?
Yes. You can send a query to google maps api using your current location and the selected annotation location. When google responds with the route, you will use that polyline decoder method to decode the data and draw the route on your map view.
I have got all side idea from here
this can be useful for other developers also.
i have found some other examples also that can be also useful for other developers just google. you will find this is polyline link for user current location use this apple code
Here is Google direction api. Read it and use it.
For test purpose you can check this request
http://maps.googleapis.com/maps/api/directions/json?origin=28.459497,77.026638&destination=28.435600,77.009997&sensor=true
And use JSON Viewer to see the json response.

iPhone MKMapKit Image Overlay

How can an image overlay be applied to a MKMapView? Basically, when you zoom in a specific location, I want an image to appear on top of the map that gives a more detailed view of the location.
I've had a look around and found different types of methods to use. I had a working example for an older SDK using the DrawMapRect function but this no longer seems to work on 4.2.
This is a good place to start...
http://developer.apple.com/library/ios/#documentation/MapKit/Reference/MKOverlayView_class/Reference/Reference.html
I was looking for polygon sample code though.
#omniscian: If you have solved it you should post something helpful for others. This page has a high google rank.

iPhone Map Rendering

I'm with building a map application for iPhone, and I wanted to ask what the best way is for bringing maps from a website onto the iPhone.
I want to fetch small images of size 80x80 and show them. This kind of activity might be achieved by using UIKit or OpenGL ES.
Also if you can bring to my notice some kind of achievement and guides for this thing, I would be really very thankful.
EDIT:
I need to get the custom maps for some other vendor..
Besides that i know how to get the images its the rendering part and displaying part that what my problem man.
For small static maps, you could use Google's static map API
You can construct a URL to get your image like this:
NSString* urlString = [NSString stringWithFormat:#"http://maps.google.com/staticmap?center=%f,%f&zoom=%d&size=%1.0fx%1.0f&key=%s&sensor=true",
aLocation.coordinate.latitude, aLocation.coordinate.longitude, // aLocation is set to the center of the map
kCardBackGoogleMapsZoomLevelDefault,
80, 80, // your map size
kAIGoogleMapAPIKey]; // your google maps API key
All the other maps suppliers support static tiles - Microsoft, Yahoo and CloudMade.
Take a look at this topic: http://discussions.apple.com/message.jspa?messageID=8157498. It's nearly the same as what you're asking for.
As far as displaying the scrolling map is concerned, CATiledLayer would be the way to go. It's a slightly complex class to use, but you can find some examples if you google it.
Would you be able to use iPhone SDK 3's MapKit API, or do you need to use custom maps?
If you have a set of custom tiles you want to load, you may want to look at mapping engines put together by companies like MapNinja that let you use your own tilesets.
Otherwise it's a lot of coding to do something like a tiled map engine yourself.
If you're looking to just embed a single, non scrollable map, then have a look at the Google Static Maps API, which will generate map images for you on the fly, depending on your request parameters.
If you want to implement a slippy map, then either try route-me, which works with OS 2.2.1, and supports custom tile servers. Or have a look at MapKit/Google Maps in OS 3.0.
You could also use the Route-Me project
http://code.google.com/p/route-me/
BSD Licensed - perfect if you need to render your own tiles