Gone are the days when users were impressed with a marker on a map. The Maps Zen blog post series covers integrations of Google Maps APIs to help your apps provide great maps user experiences. What’s a zen pattern? Simply put, a design pattern that results in harmonious user experiences. ...




Gone are the days when users were impressed with a marker on a map. The Maps Zen blog post series covers integrations of Google Maps APIs to help your apps provide great maps user experiences. What’s a zen pattern? Simply put, a design pattern that results in harmonious user experiences.








Movie & television directors have fascinating jobs — shooting movies seems like a lot of fun, right? The idea that you’re in control of the camera, framing each shot and creating an evocative scene can be really inspirational. Maps developers have the same creative direction over UI. We get to build maps scenes to create evocative user experiences.



The Maps API provides a sophisticated camera, which enables you to frame your maps in three dimensions. Its has expected capabilities such as projections, zooming and panning but additionally you can rotate, tilt and animate the camera. With that in mind, here’s a map — one that you’ve seen many times before. It’s top down, displaying a certain region, at a pre-determined zoom level.







Lets take that same location and adjust its bearing and tilt. This feels like much more like a real place. The user feels a greater sense of depth; a feeling that there’s a bigger world out there.







When directing the camera for something like a house hunting app, the map can be presented in a way that shows more of the surrounding area. First, the map type has been changed to satellite mode and as a result, the nearby beach is more impactful.







As we select the next house in the search results, the camera animates to its next location and during this journey, we’re effectively flying over the area retaining location context. There are also changes to the zoom, bearing and tilt. Once again, the user gets a strong sense of depth and a feeling of exploration. This is crucial in a house hunting scenario since it’s all about location!





To accomplish such camera angles, check out the bearing and tilt methods on the CameraPosition builder. When transitioning from one CameraPosition to another, you’ll achieve a greater impact if you animate it to place rather that instantly moving there — to do this, use the animateCamera method on the GoogleMap object.

CameraPosition.Builder
target(LatLng location)
zoom(float zoom)
bearing(float bearing)
tilt(float tilt)

map.AnimateCamera(
CameraUpdate.newCameraPosition(cameraPosition),
durationInMs,
callback);



Camera framing and animations are powerful tools. As a camera director, it's important frame your shot in order to evoke the desired emotion.





Gone are the days when users were impressed with a marker on a map. This is the first in a series of Maps Zen blog posts covering integrations of Google Maps APIs to help your apps provide great maps user experiences. What’s a zen pattern? Simply put, a design pattern that results in harmonious user experiences. ...




Gone are the days when users were impressed with a marker on a map. This is the first in a series of Maps Zen blog posts covering integrations of Google Maps APIs to help your apps provide great maps user experiences. What’s a zen pattern? Simply put, a design pattern that results in harmonious user experiences.




A common UI pattern is showing a collection of places. At first glance it seems pretty easy. You could just throw together a list of place names and you’re done, right? Its not quite that simple. Here are two ways to visualize locations using the Google Maps Android API.



First is on the map itself. Here, we remove the UI and let the map markers be the primary point of interaction. This makes for a very immersive experience, however it's only effective if the markers fit comfortably on one screen. If the user has to zoom or scroll, the emphasis of your collection is lost. For example, “Train stations near me” works well since the results are co-located.





The second method of displaying a list of places that are spread out —it uses map thumbnails. The Maps Android API offers Lite mode — an ideal mode for such scenarios.



Lite mode provides a static map; effectively just the image of a map without the ability for the user to pan, or tilt the camera. This limited functionality, however, comes with some big benefits — it’s super fast and uses less memory. Additionally, you still get click listeners, markers and polylines. Lite mode makes it possible to show lists of maps — they are just images so you can instantiate many of these.





Enabling Lite mode is simple. If you’re creating your maps in Java, on creation, simply specify litemode in the GoogleMapOptions object as shown below.

GoogleMapOptions options = new GoogleMapOptions().liteMode(true);

If your map is declared via layouts, add the xml property in your layouts as shown below. Be sure to include the map namespace since it makes the litemode attribute available.

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:name="com.google.android.gms.maps.MapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
map:liteMode="true"/>

At some point, you may need to replace the lite mode map with the fully-interactive one. In that situation, you can gracefully transition into a regular map triggered by a touch event. In the image below, Android Lollipop transitions are being used across screens. You can see the big map dissolve and the grid implode in place. For users on older versions of Android, a reasonable fallback is to instantiate a MapFragment and animate it into place.





With this technique, we’re able to mix and match Lite mode and regular maps seamlessly. I hope you’ve now seen the lite — Lite mode that is. It enables you to show multiple maps simultaneously whilst keeping your app performant.





Antoine Beyeler, a computer programmer in Switzerland, took inspiration from insects to develop drones that sense obstacles as they fly autonomously. He’s now chief technology officer of ...




Antoine Beyeler, a computer programmer in Switzerland, took inspiration from insects to develop drones that sense obstacles as they fly autonomously. He’s now chief technology officer of SenseFly, which develops drone software that farmers, miners, and other industrial clients use to produce 3D maps.



Chris Seifert, a data expert in California, is developing software that uses weather and crop yield data to help farmers plant crops and deploy resources more efficiently. He co-founded AcreValue, which analyzes public-data sources to help farmers determine the agricultural value of land they want to buy or sell.



These “precision agriculture” startups are among a new wave of companies helping farmers boost yields while using lower quantities of water, fertilizer, and pesticides. Map data is a key component, helping drones fly straight and farmers visualize data in a way they can understand.



Farming usually conjures images of overalls and pitchforks. The reality is much more complex. “It’s become a very high-tech industry,” says Seifert, who studied at Stanford University and worked at Google before launching AcreValue. “Recently, a picture of someone’s tractor got posted on Reddit, and there are four or five different screens in that photo,” he says, including precision-planting monitors and tablets for Web browsing.



AcreValue collects data from government sources, compiles and analyzes them, and presents them on top of the map. It uses Google Maps JavaScript API and the Google Maps Static Maps API to build a satellite image-viewing tool with which “farmers can recognize the fields more easily,” Seifert says.


AcreValue_1.png



The result is that farmers who want to buy or sell land can find “a very Zillow type of experience” at AcreValue, Seifert says.



“If you’re running a very, very large business, and you’re running that business in an Excel spreadsheet, you’re missing out on a lot of the spatial detail you might be getting if you can have a map view,” he adds. “That sort of transparency into what’s happening in your operations is a huge benefit.”



According to San Francisco agricultural-technology company Granular, which acquired AcreValue earlier this year, agriculture worldwide is a $3 trillion industry. The Association of Unmanned Vehicle Systems International predicts that agriculture will make up most of the market for unmanned aerial vehicles, or UAVs, once the FAA legalizes them. Many small farmers are already using inexpensive drones to survey their land.


image (1).png



Because drones can fly to specific patches of a crop much more quickly than tractors can drive, says Ken Giles, a professor of biological and agricultural engineering at the University of California at Davis, they enable farmers to observe how weather or pest conditions develop before spraying pesticides or applying fertilizer.



“If you’ve got a vehicle (that can) do a targeted spray, then you don’t have to think ahead as much,” Giles says. UAVs “allow us to be more intelligent about our use.”



Using map data, farmers can program precise courses for their drones to fly to survey their fields. Heat maps developed from drone photography help farmers visualize water use, disease outbreaks, and plant health statistics.


image.png



Like Seifert, Swiss drone engineer Beyeler is targeting midsize to large farms with his company, SenseFly. Its software, which incorporates Google Maps data, enables farmers to draw a drone’s flight path, then track and update it on the fly. SenseFly’s standard interchange formats, such as GeoTIFF, KML, and shapefiles, help different systems communicate with each other, Beyeler says.



Using its built-in GPS technology, a SenseFly drone makes several passes over a crop to take photos and gather data. SenseFly’s software then uses the information to develop a high-resolution “normalized difference vegetation map” of chlorophyll presence, a key indicator of plant health.



Self-driving tractors, also gaining in popularity, can then use the vegetation map to determine how much fertilizer to dispense.



“The farmer can see things he can’t see with the naked eye,” Beyeler says.



When Beyeler launched SenseFly in 2009, “drones hadn’t been seen so much in the private world, only in the military world,” he says. “We wanted to democratize the drone technology for civilian populations.”



“We have drones. What should we do with them?” Beyeler asked. And his company was born.





Editor’s note: ‘Map Tips’ are designed to answer frequently asked questions about Google Maps APIs. For important tips on how to deploy Google’s mapping tools, read more from Richard Coombes, Google Maps Solutions Architect at Google. ...




Editor’s note: ‘Map Tips’ are designed to answer frequently asked questions about Google Maps APIs. For important tips on how to deploy Google’s mapping tools, read more from Richard Coombes, Google Maps Solutions Architect at Google.



The number of transportation booking apps—taxi, rideshare, shuttle and limo to name a few, has exploded over the last few years primarily due to the increase in GPS enabled smartphones, fast and reliable mobile connectivity and simple, secure payment options. These apps offer real benefits to customers, drivers and taxi booking companies and location plays a critical role for all of them. Google Maps APIs enable many feature-rich capabilities that can provide the best location-based information and user experiences for booking and tracking the perfect ride.



Here are eight helpful tips for optimizing your taxi or rideshare services with the Google Maps APIs:



1. Use Places API Autocomplete for easy address entry. The type-ahead-search suggestions available with Places API Autocomplete makes it fast and easy for the customer to provide an accurate pick-up and drop-off location with minimal keystrokes. The Autocomplete feature is available in Android, iOS, Javascript and as a web service for flexible integration options.


2. Automatically locate the customer for fast booking. If booking a taxi immediately, allow your customer to automatically communicate their current location using the location capabilities of their smartphone or browser. On Android and iOS make use of the Places API Place Picker UI widget so your customer can choose their location from a list of nearby places. Alternatively, the Geocoding API can provide the nearest address to their current location.





3. Use the Distance Matrix API to find the closest taxis based on drive time and drive distance. Performing a simple radius or “straight line” distance search to find the nearest available taxis can often provide misleading results. For example, a taxi may be on the far side of a highway or the other side of a river and take a long time to drive to the pick-up point. The Distance Matrix API can calculate the driving distances and times, based on Google’s road network, to improve the accuracy of your search results.


4. Show the real-time location of the customer and driver on a Google Map. Help reassure the customer that their ride is on the way by showing real-time location of the vehicle on a map—in relation to their position. If the driver is unfamiliar with the area this can also help guide her to the customer’s location. Google has global coverage so if you’re working in multiple countries we’ve got you covered. No need to work with multiple map providers. Asset tracking with Google Maps allows a taxi booking company to view the real-time location and status of all their taxis on a central map to help process offline bookings coming in via telephone calls. Need help storing and retrieving all of your taxi fleet locations? Take a look at our previous blog post on how to store your location data in the cloud with Firebase.









5. Provide the customer arrival times based on current traffic conditions. If your customer is in a hurry, it can feel really frustrating wondering when her taxi will arrive. Keep the customer informed of the vehicle’s estimated time of arrival using the duration-in-traffic information in the Directions API.



6. Provide an estimated fare and drop-off time to the customer. Before the journey starts, provide customers with an estimated fare based on the optimal route and traffic conditions. The Directions API can provide the route distance and duration in current traffic. Alternative routes can also be provided. These details can be used to estimate when the customer may arrive at their destination and how much it should cost.



7. Improve measurement accuracy of distance travelled using Roads API. If you’ve used GPS on a smartphone before you probably know that the accuracy can sometimes be poor, especially in highrise urban environments. If you need to calculate fares, driver payments, fuel consumption or maintenance planning then accurate distance reporting is vital. The Roads API can take your original jittery GPS data and snap them to the road network as well as fill in gaps (interpolate) in missing your GPS data to ensure the path smoothly follows the road. This leads to improved distance measurements and better visualisations of where the taxi has actually travelled.



8. Better understand vehicle speed and safety. Oftentimes a taxi booking company is relying solely on information coming from the driver’s and customer’s smartphone and no in-car telematic devices are available. The Roads API can provide the posted speed limit along a road. This speed limit can be compared with the calculated actual speed of the vehicle (from GPS data) to determine if and where speeding occurs.



We hope you’re able to incorporate some of these ideas into your taxi booking systems. Learn more about what Google Maps APIs can do for your websites and applications.

Maps with many markers can be hard to navigate. On Google Search, we combat this problem by adding labels to the markers on the associated map. This allows users to associate a marker to the specific search result. Now developers are able to use this labeling property on the ...
Maps with many markers can be hard to navigate. On Google Search, we combat this problem by adding labels to the markers on the associated map. This allows users to associate a marker to the specific search result. Now developers are able to use this labeling property on the Google Maps JavaScript API.





Today, we are introducing a new label property to MarkerOptions that makes labeling your markers easier. The label property allows you to pass a letter, number, or any other character to your map markers, creating a map that is easier to navigate and read.



For example, to add the label A on a markers, you would add “label” to the pin you would like to mark:

var marker = new google.maps.Marker({
// Supply map and position params as usual.
label: 'A'
});





This feature is also available on custom icons, so you can continue to keep the same look and feel of your map.



You can set the origin of the text in your icons, as well as control the color of the text. For example:

var beachIcon = {
url: 'images/beachflag.png',
labelOrigin: new google.maps.Point(9, 9)
};

var marker = new google.maps.Marker({
// Supply the map and position parameters as usual.
icon: beachIcon,
label: {
text: '2',
color: 'purple'
}
});





For more details, check out the developer's guide and reference. As always, if you have a question, we recommend posting on Stack Overflow using the google-maps-api-3 tag. Happy mapping!



Posted by Richard Wang, Intern, Google Maps JavaScript API team