Display layers with output=embed on Google Maps - google-maps

I am currently working on a lightweight WPF control for WPF using the output=embed urls for the maps I need.
I have 2 purposes for the map control one is to get the FSA boundaries for Canadian postal codes and to show traffic conditions for a given address for a appointment tracking system for field agents
ie
FSA https://maps.google.com/maps?q=m3j%20canada
Postal Code : https://maps.google.com/maps?q=M3A%201A3%20canada
which show up in a query to regular Google maps but once the output=embed is added to the url the boundaries disappear from the map
is there a way include these in an embedded map or is this a restriction of embedded maps? if so is this functionality avail to the javascript api

Related

Google Map urls functions unsupported

we want to control Google Maps on Android/IOS devices via urls, and we've looked through the docs: https://developers.google.com/maps/documentation/urls/android-intents#display_a_map
These are the functions we need but cannot find in the document:
1. Color Scheme(automatic, day, night)
2. Map type(default, satelite, terrain), Map detail(transist, traffic, bicycling, 3D, Street View)
3. Route options (avoid highways, avoid tolls, avoid ferries)
4. Search along route
If it applies to your use case/implementation, you might want to consider using Maps SDK for Android. This will generally handle styled maps (e.g color scheme, etc.), map types (e.g terrain, satellite, etc), map details like Street View and Traffic Layers.
However for the route options, you need to use a separate web service - Directions API.
Hope this helps!

Google Street View URL for Mobile - different results than Desktop

The same URL gives different results via Mobile & Desktop.
A certain URL format for street view displays different results on different devices.
This is a starting reference for the URL's format: Google street view URL
When I load this URL:
http://maps.google.com/maps?q=&layer=c&cbll=40.741895,-73.989308
in chrome via Desktop: I get a street view of a beach
in chrome via Android Mobile device: I get a street view of a street in New York (the correct response)
It seems that google presents via desktop a view (photo) that was made by a user and via Mobile a photo that was made by google.
But in another url:
http://maps.google.com/maps?q=&layer=c&cbll=32.0522032,34.7633459
in chrome via Desktop: I get the correct street view, made by google
in chrome via Android Mobile device: "No results found for your search"
I guess this bug doesn't effect Google because they use a different entry point for street views in their services...
My goal is to present a Google Street View in a webview in an Android app and I'm trying to get the correct URL format for that.
Does anyone know what is the correct format?
The officially supported and recommended by Google way is using Google Maps URLs. Google Maps URLs allow create universal cross-platform URLs that can be used both on desktop and mobile devices and support street view mode
The pano action lets you launch a viewer to display Street View images as interactive panoramas. Each Street View panorama provides a full 360-degree view from a single location. Images contain 360 degrees of horizontal view (a full wrap-around) and 180 degrees of vertical view (from straight up to straight down). The pano action launches a viewer that renders the resulting panorama as a sphere with a camera at its center. You can manipulate the camera to control the zoom and the orientation of the camera.
You example may be rewritten using Google Maps URLs
https://www.google.com/maps/#?api=1&map_action=pano&viewpoint=40.741895,-73.989308
However, unfortunately, it gives me a beach street view on desktop. I believe this is a data issue on Google side and you can report a problem to Google using the Report a problem link in bottom right corner of the map.
In the meantime I can suggest the following workaround. You can use Street View API metadata service to get a pano ID of the point you are interested in
E.g. https://maps.googleapis.com/maps/api/streetview/metadata?location=40.741895%2C-73.989308&source=outdoor&key=YOUR_API_KEY
Note that this service is free of charge and doesn't consume your quota
Street View Static API metadata requests are free to use. No quota is consumed when you request metadata.
Also it supports a source parameter that allows filter out non-Google panoramas. In aforementioned example I get the following metadata response
{
"copyright":"© Google, Inc.",
"date":"2017-11",
"location":{
"lat":40.7419078,
"lng":-73.9893223
},
"pano_id":"qH-ml27SSSYEXUCTT2NrhQ",
"status":"OK"
}
So, now I can create a Google Maps URL using a pano ID that will open expected street view panorama
https://www.google.com/maps/#?api=1&map_action=pano&pano=qH-ml27SSSYEXUCTT2NrhQ
I hope this helps!

Places Autocomplete: Must I use a Google map if I Geocode the result with Apple?

Trying to implement a search feature for USA cities in my IOS app. My goal is to use Google's Autocomplete API while legally avoiding the use of a Google map.
So, if I use Places Autocomplete API to display a list of suggested cities as the user types do I have to use a Google map if I geocode the chosen autocomplete result through apple with CLGeocoder?
Google says you must use their data in their maps. However, if I geocode through Apple to retrieve the coordinates for display on a map, the map data isn't coming from Google. Is this legal?
I know Airbnb uses Googles places api but they use Apple maps.
According to Places API Policies:
If your application displays Google Places API Web Service data on a map, that map must be provided by Google.
If your application displays Google Places API Web Service data on a page or view that does not also display a Google Map, you must show a "Powered by Google" logo with that data. For example, if your application displays a list of places on one tab, and a Google Map with those places on another tab, the first tab must show the "Powered by Google" logo.
So you can use Places autocomplete without a Google map, but in this case the logo is required.
https://developers.google.com/places/web-service/policies

Google Map static vs Dynamic business and buildings view

I have a problem when i try to display a static map that display all elements
for example:
http://maps.googleapis.com/maps/api/staticmap?&zoom=18&size=640x640&markers=color:red|40.7191413,%20-73.9973273
In it i can't view any business and buildings.
If i display same map with same zoom in google maps or in any other application that dsplay dynamic map
i can view them.
For example:
https://www.google.it/maps/place/40%C2%B043%2709.1%22N+73%C2%B059%2751.0%22W/#40.7191413,-73.9973273,18z/data=!4m2!3m1!1s0x0:0x0
I have read this faq:
https://developers.google.com/maps/documentation/business/faq#no_pois
and tryng to apply it in this mode:
http://maps.googleapis.com/maps/api/staticmap?&zoom=18&size=640x640&markers=color:red|40.7191413,%20-73.9973273&style=feature:poi.business|element:all|visibility:on
but don't work
I's a limit of Static Map o what?
The Static Map API typically shows fewer points of interest compared to Google Maps or the Maps JavaScript API. This is working as intended, so unfortunately you can't do anything to get more POIs to show up.
You can consider using the Google Maps Embed API which might better meet your needs.

JavaME LWUIT: is there appropriate map lib?

I am developing JavaME LWUIT application which needs to display some data on map.
And I'd like to use Google Maps for this.
I thought about the requirements to the maps and their user interface. They are
listed below:
Pannable map. It should be possible to scroll the map using the touch interface or navigation arrow buttions which are displayed on the map.
Zoomable map. At the best, there should be appropriate +/- buttons displayed on the map.
Search location by address and move to it (menu command).
Remember the last visited location.
Marker for the current location.
Markers with customable icon and text which is displayed when select the marker (click on it or select somehow).
I spent some time searching for appropriate Map Library for JavaME/LWUIT.
I expected to find a free library and map service (ha-ha).
See my results below:
MIDMaps library. URL: http://www.jappit.com/blog/midmaps-google-maps-java-me-library/
That library uses the Google Static Map Service. Not bad... but it needs a lot further improvements...
I found the follwoing issues with that library:
Markers: impossible to customize marker's icon and text. Displaying the marker's text on click/selection is not supported.
Map Panning: no UI controls for this (arrow buttons). Doing panning with menu commands is not a user-friendly.
Map Zooming: no UI controls for this (+/- buttons). Not so important...
License: not permitted to use in a mobile app if not a Google Premier User. Not a problem...
Nokia Maps API for JavaME. URL: http://www.developer.nokia.com/Develop/Maps/Maps_API_for_Java_ME/
Did not try. But looks like that lib fulfills all my requirements.
I am not sure about the following things:
Quality of the maps.
How much does it cost? I mean the cost of using the map service.
Nutiteq lib which uses OpenStreetMap service. URL: http://www.nutiteq.com/map-api
Not free the lib, but the map service.
Guidebee Map API. URL: http://www.guidebee.biz/
It's not free.
Now it's a time for me to ask questions. What should I do? Are there any advices?
Maybe I missed some possibilities or lib/services?
Thank you for your help!
See the Makeover demo in SVN (I updated it to use Google maps instead of Yahoo maps API which was killed off). The GoogleService API should be available in the SVN history it was (deleted because of licensing nonsense) within the IO services directory and it includes local search etc.
Terrence has a a demo that includes allot of interesting features including a browseable map.
You can also look at Waze although I haven't checked it myself, I saw people using open street map and AFAIK there is an open source mapping application based on that (although the license might not be appropriate for you but it might still be useful as a learning aid).
After some additional investigations I decided to use Nokia Maps. And now I have a working application which displays interactive map with my data markers on it and also my current location.
I chose Nokia Maps API because it provided real dynamic maps (panning, zooming, tiling) and fulfilled all my requirements, except "Remember the last visited location" (can be implemented on my own).
I met the following problems:
Using the maps from LWUIT, not from an ordinary MIDP application. I used the approach shown here Nutiteq SDK with LWUIT and also implemented my own MapWidget class for LWUIT.
Displaying additional info on marker click. There is no support for this in the lib. I had to implement it on my own. Details are here JavaME Nokia Maps API: how to display additional info on marker click
Additional info related to the choosing proper map library can be found here Discussion on Nokia Forum