Skip to main content

Playing with the map controls

    "All work and no play, makes Jack a dull boy!". I also decided to play around with the Google Map APIs, so that we don't become dull! The following is a simple code which will show you how to control the map controls or basically the Google Map UI. So here goes the fun code...



    I don't think the above code needs much of an explanation. I will tell you what happens as a result of this code! When you move your mouse over the map, the map controls will become visible, as seen in the result above!

    When you will move your mouse out of the map, the Map Controls will disappear. The controls will reappear again once you move your mouse over the map and disappear again when you move your mouse out of the map! Keep going on, have fun...

    Hope you enjoy the code. Feel free to drop your comments, doubts, queries, suggestions!

Comments

  1. It's nearly very good.
    One glitch I get is that when you mouseover the controls you are leaving the map so there is an annoying flicker of the controls.
    Is there a listener for the controls I could add to prevent this flickering?

    ReplyDelete
  2. Yes Norrin. Even I had noticed the same! You can remove that flicker by declaring the map controls as separate div elements. This will solve the flickering issue.

    ReplyDelete
  3. Sheerang
    Quick rΓ©ponse!

    Can you give me an example please,

    ReplyDelete
  4. Sorry Norrin...I haven't been able to put up an example as yet. I will put it up as soon as I come up with one...

    Sorry for the delay...

    ReplyDelete

Post a Comment

Please leave your comments here...

Recommended for You

Playing with the markers and info window bubbles...

    In the last few posts, we have seen some marker examples and some information window examples. Now, lets do something interesting combining these two things. Just writing that "This is an info window" in the information bubble is not very interesting! And I know this...Have gone through the same phase!     So, today we will do something interesting! We will display the latitude- longitude co-ordinates of the point that the user clicks on the map! Doing this is not at all complex! Copy paste the following code and you will see for yourself a map coming to life!     The output of the above code looks as seen in the result section above! If you have any queries regarding the above code please comment on the blog post or feel free to contact me at my mail ID .

Where does Google get it's live traffic data from?

Referring to a post that I wrote earlier, Google’s - Live traffic Layer , ever wondered how Google collected this data? I was wondering the other day, how Google received live data to display it on their maps as a layer! I looked up the web and found something very interesting and am sharing the same with you all. As we all know, the traffic layer is available most accurately in several states in USA. Most major metro areas in the US have sensors embedded in their highways. These sensors track real time traffic data. Easy to miss at high speeds (hopefully anyway, traffic permitting), more commonly noticed may be the similar sensors that often exist at many busy intersections that help the traffic lights most efficiently let the most amount of people through. The information from these tracking sensors is reported back to the Department of Transportation (DOT). The DOT uses this data to update some of the digital signs that report traffic conditions in many metro areas. They als...

ES6 Rest operator

Spatial Unlimited changes to The UI Dev After being hosted on blogger 😣 for the last 6 years πŸ“†, this page has finally been moved to Github.io This means a few things for you, dear reader! You will be redirected to the new page shortly! ⏩ ⏩ ⏩ Once crapy HTML is now better looking Markdown ! 😍 😍 The entire blog is a Github repo ! 😍 😍 Spatial Unlimited is now The UI Dev 😍 😍

ES6 101 - Lexical Declarations Let

Spatial Unlimited changes to The UI Dev After being hosted on blogger 😣 for the last 6 years πŸ“†, this page has finally been moved to Github.io This means a few things for you, dear reader! You will be redirected to the new page shortly! ⏩ ⏩ ⏩ Once crapy HTML is now better looking Markdown ! 😍 😍 The entire blog is a Github repo ! 😍 😍 Spatial Unlimited is now The UI Dev 😍 😍

The Bicycling Layer...

    Recreational cyclists and bike commuters alike can plot cycle-friendly routes, find trails, and avoid snarling traffic with Google Map's Bicycle layer. Map's bike-friendly, green-toned map layer is very eye-pleasing. The Google Maps API allows you to add bicycle information to your maps using the BicyclingLayer object.     The BicyclingLayer renders a layer of bike paths, suggested bike routes and other overlays specific to bicycling usage on top of the given map. Additionally, the layer alters the style of the base map itself to emphasize streets supporting bicycle routes and de-emphasize streets inappropriate for bicycles.     Let us have a look at the following example. The code has a map which is centered at Pune, India. There are very few cycle tracks in Pune and so you will see just a few dark green lines on the map. But if you would change the latitude-longitude values in the code and center the map at USA, then you will see a...