Use Bing to geocode and Google maps api to display the map - google-maps-api-3

I have an application which is currently using the google map API. I like the maps much better, and I feel like you have more options with google maps. The problem is, Google maps has been very inaccurate when I give it an address to map, while Bing has been 100% on so far. I also like Bings Birds Eye view, but that's not as important. My question is, can I use the Bing API to take the address that I give it, return a longitude and latitude and then give that to my existing Google map to plot the point. If so, how? I looked on Bing Maps, and I couldn't find a good way to geocode an address. Below is my current google maps code
var map;
var directionsPanel;
var directions;
function initialize() {
map = new GMap(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(41.1255275,-73.6964801), 15);
directionsPanel = document.getElementById("route");
directions = new GDirections(map, directionsPanel);
directions.load("from: ADDRESS 1 to: ADDRESS 2 ");
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
}
I want to replace ADDRESS 2 with the longitude and latitude which Bing gets

As Matt Phillips suggests, you should read the terms of service: http://www.microsoft.com/maps/product/terms.html
There is a restriction regarding combining different map services:
Restrictions on your use: We do have some restrictions on your use of the service. You may not:
...
integrate the Bing Maps Platform or any of its content with any other mapping platform;
The Google terms of service are also quite strict and I'd imagine they'd have a similar restriction.

Looks like you should check out the Bing Maps API licensing to see if thats really the road you want to take. If it is then I would suggest looking at the api to see how you can do that.

You can use the Bing Locations API.
Here is an article on how to Find a Location by Address. You can then use the latitude and longitude to give to Google Maps.

AFAIK, the Bing Maps Ajax Control does not support Geocoding. You will need to use their web services: SOAP or JSON or XML.

Related

how to get street coordinate from google map api?

I am trying to make a web app based on google map api.I want to put image icon at different position of street in map.
how wiil i get these street coordinate from google map api?
Please give your useful suggestion.
Thanks.
Google have a service called Geocoding - you send a request including an address, a google.maps.latLng, or a Place_ID and it returns an array with all three of them. they explain all about this here.

Google Maps API and ASP.Net

I am new to Google Maps API and I have a requirement to integrate Google Maps API with an ASP.Net application. Is there a Google service where in I can input a UK postcode and radius as input parameters and get results only, without the map.
For example if I search for solicitors in a particular area like Z1 1XY (not real post code) with a radius of 5 mi, can I get the results of all solicitors with the postcodes 5 mile radius? Is there any service that would return the result set only? I know GeoCoding does something similar but can I provide radius as one of the input parameter and get results.
Any help would be appreciated. Thanks in advance.
Seaton
The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions.
Source: https://developers.google.com/maps/documentation/geocoding/#Limits
yes, you can use the Google Geocoding API to do address lookups (in this case postcodes). The response contains lat/lon co-ordinates which you can then subsequently use as the epicenter of your search to find items within a radius. Have a look at this blog post on how to use the DbGeography in .NET to perform radius queries based on lat/lon co-ordinates.

Finding Places without providing nearby location

In Google Maps, I can type in 'Eiffel Tower' and it will present the correct location/Place. But using the Places Library with Maps API, it seems that you must always provide a nearby location when searching. You can't search for 'Eiffel Tower', it has to be 'Eiffel Tower' and you have to provide coordinates for 'Paris, France' as well. Is there any way to achieve an API experience closer to the regular Google Maps experience?
UPDATE:
If I search with the regular Maps API Geocoder, 'Eiffel Tower' does in fact return the correct address. But if I search Geocoder with 'Madison Square Garden', I receive completely unrelated locations. This is despite the fact that the Google Maps website does immediately identify 'Madison Square Garden' correctly.
Summary: It seems that the Places Library cannot search Places without a nearby Location provided. Additionally, Geocoder can sometimes search for famous places but not other times. Results do not seem to correspond to the Google Maps website results.
When you search in Google Maps, you ARE providing a "nearby" location. It uses the center/bounds of the current map view. Searching for a place without context wouldn't be very helpful.

Nokia Map Tiles REST API

I have an account for Nokia Maps API but am wondering what URL I should use to request tiles through the API correctly? I am using the Leaflet maps API and my URL string looks like this:
http://3.maptile.lbs.ovi.com/maptiler/v2/maptile/newest/normal.day/{z}/{x}/{y}/256/png8?app_id=XXX&token=XXX
It works, but I don't believe I am using the API correctly - I just stole the first part of the URL (http://3.maptile.lbs.ovi.com/maptiler/v2/maptile/newest/normal.day) from the Network tab of dev tools when I checked out Nokia maps in my browser.
In the documentation it tells me I can request based on lat, long and zoom, but not based on X and Y.
Is anybody familiar with Nokia Maps API?
Regarding the original question I'm guessing you have acquired credentials for the Map Image API: http://developer.here.net/docs/map_image/index.html There are a series of interactive examples available, which explain how to get back a static map image using latitude and longitude such as this one here: http://developer.here.net/apiexplorer/examples/api-for-rest/getting-started/basic-map-wh.html All the urls for the Map image API start with http://m.nok.it
Using URLs for the map tiles from the http://here.com website isn't the same service, it isn't an official API (hence the reason it is undocumented) and the URLs could be changed without notice.
Updated
HERE now offers three web-based Maps APIs, and since last year a TMS (Tile Map Service) a.k.a. Map Tile API, which is what I think you are after is now publicly available.
As noted by Luciano Issoe, the correct URLs for the Map Tile API are now publically documented see: https://developer.here.com/rest-apis/documentation/enterprise-map-tile
Alternatively, if you want to use an interactive map service with Nokia's mapping data, your best bet would be to use the Maps API for Javascript described here:
http://developer.here.net/docs/maps_js/index.html
It seems that it´s a documented service now: https://developer.here.com/rest-apis/documentation/enterprise-map-tile
To retrieve a map covering a specific area using the Map Image API, add two points of interest to the map for the top right and bottom left corner and then use the nomrk to make the POIs invisible:
http://m.nok.it/?w=512&poi=52.6764,13.7636,52.351,13.0185&nomrk

google maps and asp.net

i am developing an application which makes use of Google maps. Google maps API returns the result with map on new screen but I want to retrieve only the latitude and longitudinal coordinates .. so please help me with:
How to retrieve them
How to dynamically send name and address of the location
This is too broad a question so without further information it is hard to explain.
These link might help:
http://www.mikeborozdin.com/post/Working-with-Google-Maps-API-in-ASPNET.aspx
http://www.codeproject.com/KB/scripting/Use_of_Google_Map.aspx
Use google and you will find a lot more.

Resources