Google Street View with a Date


The Google Earth Blog noticed that Google Maps Street View images now come with a date telling you when the panoramas were taken.

If you look at the bottom left hand corner of a Street View image you can now view the month and year when the picture was taken.

Another nice little feature I’ve noticed Google Maps testing recently is the highlighting of search results. For a while now when you search for a location in Google it has shown a map with the searched area highlighted. Google have been testing this feature in Google Maps as well.


This feature still seems to be very much in the testing stage. I noticed the feature was working this morning but this afternoon it no longer seems to be working for me.

Finally, in Chrome (but not in Firefox and IE for me) the satellite button in Google Maps now shows the satellite view directly beneath the button.

via:googlemapsmania

Now you can test your Mobile Web Apps with WebDriver

Mobile testing has come a long way since the days when testing mobile web applications was mostly manual and took days to complete. Selenium WebDriver is a browser automation tool that provides an elegant way of testing web applications. WebDriver makes it easy to write automated tests that ensure your site works correctly when viewed from an Android or iOS browser.

For those of you new to WebDriver, here are a few basics about how it helps you test your web application. WebDriver tests are end-to-end tests that exercise a web application just like a real user would. There is a comprehensive user guide on the Selenium site that covers the core APIs.

Now let’s talk about mobile! WebDriver provides a touch API that allows the test to interact with the web page through finger taps, flicks, finger scrolls, and long presses. It can rotate the display and provides a friendly API to interact with HTML5 features such as local storage, session storage and application cache. Mobile WebDrivers use the remote WebDriver server, following a client/server architecture. The client piece consists of the test code, while the server piece is the application that is installed on the device.

Get Started


WebDriver for Android and iPhone can be installed following these instructions. Once you’ve done that, you will be ready to write tests. Let’s start with a basic example using www.google.com to give you a taste of what’s possible.

The test below opens www.google.com on Android and issues a query for “weather in san francisco”. The test will verify that Google returns search results and that the first result returned is giving the weather in San Francisco.

public void testGoogleCanGiveWeatherResults() {
// Create a WebDriver instance with the activity in which we want the test to run.
WebDriver driver = new AndroidDriver(getActivity());
// Let’s open a web page
driver.get(“http://www.google.com”);

// Lookup for the search box by its name
WebElement searchBox = driver.findElement(By.name(“q”));

// Enter a search query and submit
searchBox.sendKeys(“weather in san francisco”);
searchBox.submit();

// Making sure that Google shows 11 results
WebElement resultSection = driver.findElement(By.id(“ires”));
List searchResults = resultSection.findElements(By.tagName(“li”));
assertEquals(11, searchResults.size());

// Let’s ensure that the first result shown is the weather widget
WebElement weatherWidget = searchResults.get(0);
assertTrue(weatherWidget.getText().contains(“Weather for San Francisco, CA”));
}

Now let’s see our test in action! When you launch your test through your favorite IDE or using the command line, WebDriver will bring up a WebView in the foreground allowing you to see your web application as the test code is executing. You will see www.google.com loading, and the search query being typed in the search box.


We mentioned above that the WebDriver supports creating advanced gestures to interact with the device. Let’s use WebDriver to throw an image across the screen by flicking horizontally, and ensure that the next image in the gallery is displayed.

WebElement toFlick = driver.findElement(By.id(“image”));
// 400 pixels left at normal speed
Action flick = getBuilder(driver).flick(toFlick, 0, -400, FlickAction.SPEED_NORMAL)
.build();
flick.perform();
WebElement secondImage = driver.findElement(“secondImage”);
assertTrue(secondImage.isDisplayed());

Next, let’s rotate the screen and ensure that the image displayed on screen is resized.


assertEquals(landscapeSize, secondImage.getSize())
((Rotatable) driver).rotate(ScreenOrientation.PORTRAIT);
assertEquals(portraitSize, secondImage.getSize());

Let’s take a look at the local storage on the device, and ensure that the web application has set some key/value pairs.


// Get a handle on the local storage object
LocalStorage local = ((WebStorage) driver).getLocalStorage();
// Ensure that the key “name” is mapped
assertEquals(“testUser”, local.getItem(“name”));

What if your test reveals a bug? You can easily take a screenshot for help in future debugging:


File tempFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);

High Level Architecture

WebDriver has two main components: the server and the tests themselves. The server is an application that runs on the phone, tablet, emulator, or simulator and listens for incoming requests. It runs the tests against a WebView (the rendering component of mobile Android and iOS) configured like the browsers. Your tests run on the client side, and can be written in any languages supported by WebDriver, including Java and Python. The WebDriver tests communicate with the server by sending RESTful JSON requests over HTTP. The tests and server pieces don’t have to be on the same physical machine, although they can be. For Android you can also run the tests using the Android test framework instead of the remote WebDriver server.

Infrastructure Setup

At Google, we have wired WebDriver tests to our cloud infrastructure allowing those tests to run at scale and making it possible to have them run in our continuous integration system. External developers can run their mobile tests either on emulators/simulators or real devices for Android and iOS phones and tablets.
Android emulators can run on most OSes because they are virtualized, so we run them on our generic cloud setup. Though there are many advantages to using Android emulators because they emulate a complete virtual device (including the virtual CPU, MMU, and hardware devices), it makes the test environment slower. You can speed up the tests by disabling animations, audio, skins, or even by running in the emulator headless mode. To do so, start the emulator with the options –no-boot-anim, –no-audio, –noskin, and –no-window. If you would like your tests to run even faster, start the emulator from a previously created snapshot image. That reduces the emulator startup time from 2 minutes to less than 2 seconds!
iOS simulators can’t be virtualized and hence need to run on Mac machines. However, because iOS simulators don’t try to emulate the virtual device or CPU at all, they can run as applications at “full speed,” this allows the test to run much faster.
Stay tuned for more mobile feature in Selenium WebDriver, and updates on the Selenium blog.

Google Maps Mashups 23

Seattle Food Inspection Map


The Seattle Food Inspection Map lets you examine the food inspection ratings for Seattle restaurants.

The map includes a nice slider function that allows you to search for restaurants in Seattle based on the inspection score. For example, you can set the slider to show only restaurants that have a score between 0-45 (a score of over 45 indicating a poor inspection).

Alternatively you could search for restaurants that you might want to avoid by setting the slider to only show restaurants with a score over 45.

NYC BigMaps


NYC BigMaps have used the Your Mapper map creation tool to map restaurant inspections and 311 service calls in New York City.

The restaurant inspections map displays New York City Department of Health inspections across 5 boroughs since Jan 2008 (22,440 restaurants). You can search the map by category, date range, keyword, and location. The map then displays restaurants on the map at the location you searched.

Track Maps using Google Analytics


Ubilabs has written up a very cool explanation of how you can track users’ interactions with Google Maps using Google Analytics.

The trick involves using Google Analytics event tracking on your map. For example you can add a tracking event to map markers to see how many times users click on different markers.

Ubilabs say that they regularly use Google Analytics on their created maps to track map types used (‘map’, ‘satellite’, ‘hybrid’ etc), location search (geocoding requests) and map marker and drag events.

Web 2 Map


The Web 2 Map is a metaphor of the internet, as seen by the organisers of the Web 2.0 Summit. The map assigns territories or ‘countries’ to different sectors of the internet, for example ‘social networks’, ‘search’ ‘e-commerce’ etc.

This year the map also includes a data layer. The data layer adds what might be seen as capital cities to the map. The buildings or skyscrapers in the city act as a metaphor for the different data segments within the dominant player in that sector.

For example, the Union of Social Networks includes a Facebook capital city. The Facebook city is dominated by a ‘social’ skyscraper but also includes a smaller ‘location’ building to reflect that Facebook also now includes check-ins etc.

findmark.org


Mark Bosworth, a GIS Analyst at Metro in Portland, has been missing since Friday September 16, 2011.

Mark is a cycle Oregon volunteer and was last seen walking to his tent in Riddle, Oregon. Mark’s family think that he may have had a recurrence of cancer that has caused him to become confused and possibly lose his memory.

There have been several sightings of someone fitting Mark’s description hitch-hiking near I-5. Therefore Mark’s family and friends have been distributing flyers up and down the I-5 corridor. This Google Map is being used to help plan where the flyers have been and need to be distributed.

If you are able to help with distributing flyers you can print them out from the website launched by Mark’s family – findmark.org. You can then use the map to see the areas where flyers still need to be distributed.

The Bambuser


One of my favourite smartphone apps is live broadcasting application Bambuser. The application lets you broadcast live video straight from you mobile phone or a webcam.

The only bugbear that I used to have with Bambuser is that it didn’t have a map of broadcasts happening right now, so that users could select from the currently live broadcasts geographically. Well, now it does!

The live Bambuser Google Map shows the location of live broadcasts, those recorded in the last 24 hours and even older recorded broadcasts. You can even watch the live streams directly from the map.

The Corruption Tracker Google Map


Having come across the concept of baksheesh more than a few times in my travels around the world I know how frustrating it can be to have to pay bribes to officials just to get them to do their jobs properly. It often seems that the practice is officially encouraged and that there is no point in reporting the incident.

In these situations it would be at least satisfying to be able to warn the rest of the world about the corruption.

The Corruption Tracker uses Ushahidi’s map reporting system to allow users to report and map any corruption that they witness or are subject to.

Users can report corruption by sending an email, by sending a tweet with the hashtags ‘#corruption’, ‘#bribe’, ‘#anti-corruption’ or ‘#theft’, or by filling out a short form. Submitted reports of corruption then appear on the Corruption Tracker Google Map.

London Bus Waiting


Transport for London recently started beta testing a new Countdown API to provide real-time departure information for all buses at every bus stop throughout London.

Next Bus London has quickly released a Google Map that shows the location of London bus stops and informs you how long you will have to wait to catch a bus.

To find out exactly how long you will have to wait you simply need to click on a map marker and an information window opens displaying the bus number, destinations and waiting times for the next few scheduled buses at that stop.

The University of Montana


I came across this beta campus map of The University of Montana today. The map includes a couple of nice features to help students and visitors find their way around the campus.

The Google Map includes a transparent overlay that adds interactivity to the buildings on the map. Users can click on individual buildings and get links to the building’s page on the university website and to printouts of floor plans of the building.

The map also includes a nice directions feature that allows users to quickly select and find walking, driving and bus directions between different locations at the university.

Other layers allow users to view photos, art exhibitions, bus-stops, parking spots, places to eat and wi-fi locations.

timespentalone.com


Where Do You Want To Go? is a great idea to get people to share the places they want to go and why they want to go there.

To submit a desired location users simply need to enter a destination and some brief thoughts about why they want to visit. Whenever a user submits a destination, the destination is Tweeted by timespentalone with a link to the user’s Google Map.

The best submissions are added to the Where Do You Want To Go? main map. The main map rotates through the submissions to the site, showing a Google Map satellite view of the location and the submitter’s thoughts.

My only complaint with the application is that the map is a little slow. I’d like the application to move onto the next submission after about ten seconds or maybe add a button so users can manually move to the next map.


The application reminds me a little of ZeFrank’s A Childhood Walk

For his project Ze asked people to recreate a childhood walk in Google Maps Street View. He then put together a collection of the responses superimposed on top of the appropriate Street View image.

Google Maps based photo album


Codrops has created a very nice template and tutorial for a Google Maps based photo album.

This multi-level map and image gallery displays images related to their location. The first level of the map shows the location of places that have a set of images. If you click on a marker on the first level the map will zoom in and also display thumbnails of the photos at this location.

Clicking on a marker in the second level will result in the photo being displayed next to the map. The images can also be viewed in a lightbox and the map can be viewed in full-screen.

The Robot’s chaosinyourtown.com


Robots from the year 2029 have been sent back in time to destroy you and your home!

Yes – the robots are here to get YOU!

Chaos in Your Town lets you create a blockbuster robot film featuring your very own street and house. Using Google Maps Street View as the background to the scenes Chaos in Your Town creates an incredible Flash based movie that shows robots walking down your street, targeting your house and blowing it to kingdom come.

This is the best thing you will see this week. Don’t believe me? Then just have a look at the screenshots below – and then go and create your own movie.

A heat map of Somalia


Voice of America has used a series of Google Maps and over 10,000 separate data points on rainfall, food prices and refugee movement to explain How Somalia Descended into Famine.

The visualisation explains over a series of Google Maps how the non-occurence of last year’s rain season in Somalia has led to crop failure, this year’s spike in food prices and then widespread famine.

The rainfall map lets the user view rainfall levels throughout Somalia. If you click on one of the rainfall markers you can view a graph of rainfall at that location comparing 2010’s rainfall with rainfall in 2009.

The food prices map allows the user to select different towns in Somalia and view graphs showing the sharp rise in price of a number of different crops and other essential commodities.

Finally the famine map provides a heat map of Somalia showing the scale of the famine at different locations in the country.

Driving Directions


Google Maps has added the option to preview driving directions in 3D using the Google Earth plugin.

Now when you use Google Maps for driving directions you will see a 3D button next to your directions.


When you click on the 3D button the map will switch to the Google Earth view. An animated fly-through of your route will then be shown.

You can pause the flight at any time by clicking anywhere in the 3D view or on the pause button. It is also possible to jump to different stages in your directions by clicking on a step in the left hand panel.

Try a Flight

The GitHub – Masked Polygons


Swiss Trains have open-sourced the code for a very cool masking effect on Google Maps.

The effect transforms a KML polygon into a mask that effectively highlights the polygon on the map by shading the rest of the world. You can see a demo of the effect on this Swiss Administrative Boundaries Map.

When you select a region on the Administrative Boundaries Map the chosen area is highlighted and the rest of the map shaded out.

The mask is a very effective tool. If you want to use the effect in your own Google Maps then grab the code from GitHub – Masked Polygons.

Via Googlemapsmania