Back with another google maps V3 question.
Here’s the background; I now have a map populated by a number of markers with info windows and what I want to do is add a link in the info Window that when pressed opens another browser window with google maps directions info in it.
I'v read a number of tutorials including the one by Mike Williams but most of them are either written for V2 of the API or just plain don’t seem to work, so do any of you good people know of a good noob tutorial that can give me some idea how to do this?
Thanks in advance
If you're just trying to send folks to http://maps.google.com for a directions query, a URL like http://maps.google.com/maps?saddr=Start&daddr=end might work, but I don't think there's any official documentation on those URLs.
If you want to have directions as part of your application, you should probably take a look at some examples of the Direction Service in the JS API.
Related
I’m working on a vuejs project, I want to make some data visualisation on a map: display a map and show some percentages for each country. I really do not know from where to start. What tools to use ? Is there some tutorials and javascript libraries that can help ? Thanks !
If you just want to show some percentages on each country, and you don't need those detail information on the maps, maybe you don't need Google Maps.
Try D3.js. There are several examples you can build with. DataMaps would be a good choice.
you could use the google maps api, they have good documentation on all their stuff.
https://developers.google.com/maps/documentation/
It should be noted however that these days you need a account with billing information to use their maps api's.
to be honest your question is so broad that if i were you i would first start to brainstorm and get a good grasp about what i wanted to do and how to do it.
am thinking of creating an app as a project for my app development class, which gives direction to the school campus building from the present location. Is that a possible, if so can anyone suggest some advice what should i look into.
thank you
you will depend on Google API and here some links will help you :
Google Map API :
https://developers.google.com/maps/documentation/android/ and here good example on how to get your location and draw markers on map
http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/
and you will need Google Direction API to get the direction from place to another with more functionality you can use in API
https://developers.google.com/maps/documentation/directions/
good example on Google Direction API :
http://wptrafficanalyzer.in/blog/drawing-driving-route-directions-between-two-locations-using-google-directions-in-google-map-android-api-v2/
and any related good tutorial i will edit my answer with it
hope it helpful for you and feed me back in any thing not obvious for you
if so can anyone suggest some advice what should i look into
The main advice i will give you is to begin your reading with official doc Getting Started which is a complete tuto. Follow it step by step in order to be canalised, because there is many docs in the web, and some of them talk about API v1 of Google Map which is now deprecated.
Otherwise, you will be lost ;)
I am trying to immerse myself into the Google Maps API to display some locations on a website. I have looked through the official documentation found here: https://developers.google.com/maps/documentation/javascript/tutorial However, I am a visual learner, and have a lot more success working through tutorials hands on.
My objective for now is very simple, I just would like to display a sub locality (that is already within google maps, i.e. https://www.google.com/maps/preview?authuser=0#!q=Greenfield+Lakes%2C+Gilbert%2C+AZ+sub+locality&data=!1m4!1m3!1d33995!2d-111.7348491!3d33.3303003!4m10!1m9!4m8!1m3!1d4249!2d-111.736458!3d33.338736!3m2!1i1920!2i979!4f13.1 and display that on my own website.
Does anyone have any recommendations on how to start this process or know of a tutorial that could help me on my way?
i have implemented same with google maps. may be this will give you some idea Google Maps implementation
also answered similar question here https://stackoverflow.com/a/7894821/942855
I am creating a mobile app using Phonegap, JQuery Mobile and Google Maps API V3. The mobile app will allow users to input a destination address and then using the Google Directions API, I will show them the navigation directions to arrive to their destination.
However, the application will also be marking on the map any roads closed due to construction or maintenance works. Is there a way so that if Google Directions shows the driver to go through a particular road where there are maintenance works I change the route for him to go through a different street? The road which will be closed will be marked by a map marker, so as such all I need to do is check if there is a marker and if so, update the route to go from a nearby road/side street.
I am quite new to this, and would be really glad if someone can point me to some tutorial or tell me how this can be done.
Thanks!
There is no option to the specified particular road though, you might be able to get alternative route from Google Direction API.
You should specify "provideRouteAlternatives" property when the code invokes DirectionsService.route() method.
Then Google will attempt to calculate another routes.
That is only available option that I have known.
provideRouteAlternatives property
https://developers.google.com/maps/documentation/javascript/reference#DirectionsRequest
I am trying to embed a Google Map into a dynamic webpage. The only variable the map depends on is the address of a business. That address comes from the website's database. I cannot just statically generate embed code for each dynamic page using the same set up. Is there a way I can embed a map based on that address and show a marker/bubble showing Google's information on that business?
So far, I have explored a few options including using the Google Map API and the Google Data API or just messing with the embed code given by Google. If I use the APIs it seems I have to design my own types of markers and maybe even supply my own data.
It doesn't look like there is an easy solution.
Any ideas?
Thanks.
EDIT: I'm not hung up on going from an address to a longitude and a latitude. I want the info window or "bubble" for a marker to show Google's information of a business.
EDIT: On Roy's suggestion I have been trying to use the map and search API together to achieve what I want. However, the only way I can execute a search with searchControl.execute('business name here'); is if the SearchControl is drawn. Thing is though I don't want to show any search controls. I have been able to hide it, but that just seems like an inefficient hack way of solving this.
Don't just use the embed code. Write a bit of Javascript that will draw a map for you and pass it the address.
Loads of examples here:
http://code.google.com/apis/maps/documentation/examples/index.html
I'm not sure which bit you're stuck on, but you don't need to design your own markers. Google can also create a marker from an address and it can find local business information if it has it (using local search API I think).