I have a business directory website and i need to show the user business location on google map for each users.
When the user entered that particulat place in to the textbox and then click on the update map button,
How to show the entered place in google map on my website. Is it possible?
Yes it is possible. You will have to use the geocoding service.
Geocoding is the process of converting addresses (like "1600 Amphitheatre Parkway, Mountain View, CA") into geographic coordinates (like latitude 37.423021 and longitude -122.083739), which you can use to place markers or position the map.
You can check this for more
Related
I'm developing an asp.net web app and i need to detect the current Geo location and save it to a variable and than show to user its current place name and through this I will guide the user to where he want to go, and than user will in put the destination and I will guide that what the root will be suitable for him and I will provide full detail.
I'm getting its current location but don't how to show to user by displaying on label or in textbox.
I don't know where to start this.
If you are able to access the current geolocation of the user then you need to do the following things-
Get Destination
Now you need to get the destination name from the user using some mode of text input or, speech to text etc.
Geo Code destination
Now you need a good geocoding API to get the coordinate of the destination that user has entered. You can use google's geocoding API. It is available for both client(JavaScript) and server(C#, Java, PHP -etc) side. All you need is an API key.
Find Route
Now you have to find the route between the two coordinates (your current location and destination coordinates). Google provides a direction API for the same. Again you can implement this both on the client or, server side (I will prefer client side to reduce the load on the server end). This API returns a long polyline string which can be decoded into a list of coordinates to plot the route on the map. It also returns a list of maneuver data containing the direction info and road names etc. This maneuver info will help you to direct your user to the destination at the time of navigation.
Plotting the route
Now is the time to add a map canvas to your application and then plot the route to it. You can now use the list of coordinates that you decoded from the polyline to draw a polygon on the map. See this below screenshot from one of my application where I drew the path on the map and also marked all the maneuver points on the path.
Navigation
Well, now you are almost done. Now you can start navigating to the destination. Now use whatever mechanism you use to get the user location periodically and then update it as a marker (you can use a car's icon) on the map and then whenever you reach (calculate the distance) a maneuver point show user the maneuver message like "Turn right"/"Turn left"/"Continue straight for 100 meter" -etc.
If you are stuck with getting the current user's location then you can use HTML5 to get devices location using the network.
Hope this is helpful for you.
We want to make an app where we need to integrate google map. Though we have visited the google web page for knowing the pricing. We want to know If we integrate as it "Standard User" and want to have below feature
As per our understanding - google charges whenever the map is loaded or API is used by the user. Anything above the daily quota of map load has to be paid.
In Zoom feature - will Zoom in and zoom out is treated as two calls.
Similarly, pan feature - will it be treated as map load
Draw circle to create an area on the map to find specific info which is already fed by the user based on the location. Will it also be treated as a call or map load?
In case if user to find location with typing - will the number of characters typed and its search result will be treated as API call for which we have to pay in the case of the above daily quota
I don't know about the last two but the first two are covered in the FAQ for Google Map APIs
After a web page or application loads a map, a static map image, or a Street View panorama, any user interactions with it, such as panning, zooming, or switching map layers, do not generate additional map loads or affect usage limits.
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.
We have a backend SQL database on our ASP.NET website that holds each customer's:
Business Name,
Street Address,
City/Town,
Country,
Postcode/ZIP
We want to create a contact.aspx?customerid=123456 webpage which displays these details (depending on customer profile chosen) and then a medium sized map for their address underneath the contact details.
We can get ASP.NET to write some HTML code for the page depending on the customer.
What exactly should we get ASP.NET to write for the HTML? Do we need to ask the customer to get the latitude and longitude co-ordinates first and load them into their database profile? Or can we just pass the address fields above to the page?
TIA
Mark
You can use the google maps geocoding service to convert your addresses to lat/lng points which can be transferred to the map as a parameter.
We have a requirement of displaying multiple pin markers on google map. The pin markers will be based on some addresses fetched from DB when user do a search. I know how to display multiple pin makers on google map, which is pretty trivial. On search we will have a couple of addresses, will get the lat long of those addresses and will create a list of map objects to display on map.
But the non trivial part is, we also want that when user moves within the map, dynamically we search against the database and find new addresses based on user focus and display pin markers of those addresses on map.
You probably want to have an event listener on the bounds_changed, center_changed or dragend events on the map object. This then makes an AJAX request to a page on your server, passing it the new coordinates for the map center (for instance). This page returns data about the markers, which you then re-plot.