Placing Hotels having same Geo-Coordinates - google-maps

I am facing a problem that in a teretorry I have to display 6 Hotels with info windows but the problem is that all having the same geo coordinates.
Is there a way that despite having the same coordinates all are visible?
Thanks

I guess the hotel coordinates (latitude/longitude) are from a different API like expedia or so.. The hotel APIs sometimes provide only area coordinates.
I would try to solve the problem by the address and not by the coordinates. Just get the hotel address from the hotel API and use Google Maps Api to show the hotels by that address.

If that isn't an area coordinate you can use a special marker as a placeholder and print all information in the infowindow.

Related

Draw route and get distance from coordinates

we're working on a web app for fleet management.
We collect coordinates from vehicles and we would like to show a map with the "history" routes and the km traveled.
Problem is that the position sometimes is out of the road, so route API shows a strange route. This translates into a "drawn route" with a strange path and a lot of km more. Another problem is that the route is the one currently suggested, for example for work in progress
We are also trying to use polylines but that means that the line does not follow the road (ex curved road).
Do you have any suggestions?
thanks
See https://developers.google.com/maps/documentation/roads/snap for snapping the gps locations to the roads and interpolating the gps locations to account for roads that are not straight.

Why is google streetview not displaying image for some coordinates?

I am having an issue where some coordinates are providing correct streetview image while others are off by several lots. For example, the coordinates for 42.4025192834409,-83.1636018491871 in streetview bring me to the intersection nearby. If I enter those coordinates into google maps the pin location is correct but then I can't drag the streetview icon in that section. Is there anything we can do differently with our coordinates so that they go to correct location for streetview?
When I search for the address it works as you are seeking. I think this is the discrepancy you are experiencing:
https://developers.google.com/maps/documentation/streetview/intro
The Google Street View Image API will snap to the panorama photographed closest to this location. When an address text string is provided, the API may use a different camera location to better display the specified location. When a lat/lng is provided, the API searches a 50 meter radius for a photograph closest to this location.
You may want to try reverse geocoding.
Try again now.
https://maps.googleapis.com/maps/api/streetview?size=640x480&location=42.4025192834409,-83.16360184918&fov=90
When I read your question two days ago, it was actually getting the wrong panorama. I tried again today and it finally got the closest panorama to those coordinates. I guess it was an issue on Google's end.

Google Street View: How to get indoor panoramas as Google does

I'm looking for a way to get exactly the same indoor panoramas for businesses Google is showing in [Google maps] (can't add any more links).
What I did:
google.maps.StreetViewService class requires either lng/lat or pano ID, so...
convert business address to lng/lat using google.maps.Geocoder (issues occured, see below)e.g. Richard-Wagner-Str. 7, 04109 Leipzig, Germany
convert business to lng/lat using google.maps.Place (issues occured, see below)e.g. Park Hotel, Richard-Wagner-Str. 7, 04109 Leipzig, Germany
thanks to this post I found a way to get pano ID for a certain address
Issues:
None of this was working as I hoped for...
get indoor panorama by converting business address to lng/lat:found resulting panorama to be wrong business at same address (got restaurant, wanted hotel) --- and no, there was no resulting array with multiple entries
get indoor panorama by using whole search term with places API:
got slightly different lng/lat but was outside panorama instead of inside
get indoor panorama by pano ID:
working fine but still was outside panorama
Questions:
It must be working. Somehow. Any idea how Google's doing the job? (check with Google maps, review box on the left: using address responds with same outside pano Google shows as well. But how to get corresponding inside pano?)
How to make sure a pano is inside, not outside?
Quite often, Google offers multiple indoor panos for a certain business. Any suggestions how this may work?
documentation of http://developers.google.com/places/place-id#id-overview says, place-id "... can be used with Google Maps Javascript API ..."Any idea why not working with street view panos?
Many thanks!
Update
Making my questions more precise:
How do I get same indoor panoramas as Google does?
How do I get more than just one panorama per business (as Google does)?
Any chance to make street view work with Google Places place_id?
you can use this tool to extract pano ID :)
www.ekreativa.com/pano-id-extract/

Google maps embed API fallback coordinates

I have a website that contains a database of places, mostly stores and small businesses, and i want to add a google map for every business on the site. I have a name and coordinates for each business, but not all of them are listed on google maps. If i make a Google Maps Embed API map like this:
https://www.google.com/maps/embed/v1/place?key=APIKEY&q=Place name
I will get a marker on that place, but if that place is not found, is it possible to make it put a marker on the coordinates provided?
I know i can just use the coordinates without any name, but in case the place is listed on google maps, querying its name instead of coordinates will display details about the place
Yes you can still place a marker as long as you have the lat and long.
You can add your business to Google Map over here.

Google Maps vs Mapquest

I figure I'd drop this question here.
I wrote a curl script that gets the longitude and latitude for an address using the google maps API.
Works great!
The problem I have is that when I check the coordinates that my script generated.... on Google Maps and Mapquest the maps show different locations on the same coordinates.
In this case the coordinates are : 41.461754, -74.443577
Give it a shot. You'll see what I mean.
has anyone else experienced this problem? any solutions?
I don't rely on mapquest. They have my home 1 block from it's correct location. They show my home in what is a vacant house 1 street west. Need contact info so can advise them of their error.
I compaired it with openstreetview the result is the same as in google maps. It seems that just mapquest does not know the streets near to your position. If you scroll out the streets seems to be the same, but I live on another continent so far I don't know that environment.