Add marker in google maps with Flutter - google-maps

I have managed to create a google map in my flutter app and I am able to show my location and also markers using latitude and longitude. Does anyone know how to create a marker for a business which already exist in google map? What should I pass to the marker to identify a business which is already in google map??? Thanks

You can use a Place Search or Autocomplete service to find an existing business, and then pass the lat/lng coordinates you get from the results, in geometry.location, to a marker's position so that the marker is placed on that business' location, as demonstrated in those linked examples.
Hope this helps!

Related

Google Maps Api - newbie

I am starting to work on a Google Maps project, but I am totally new to Google Maps Api, as well as my JavaScript skills are quite small, my background is Java. I have started reading throught the docs and tutorials, but some basic questions stay unanswered, so I hope to get some help from you.
Does Google Maps api provide a way for user access control? Lets say, I have a map where my registered users(Joomla site) can add placemarks, how do I tell Google Maps if this user is allowed to work on the map? Or do I have to take care of that by myself without the Maps API?
What would be the right approach to create the following functionality: I want to let a user add a placemark to an empty map. Then I will check if the point added is ok for public publishing. If it's ok, then I want to transfer that placemark to the public map.
Is there some Maps API function to read out the placemarks on a specific map?
Andy
Regarding the user access control, it seems that I have mixed two things. When you use Google Maps on Google website, and you create your map with markers, you can specify other users who are allowed to add and edit markers on that map. However, Google Maps api obviously does not save a server side copy of the map you are working on. So everything happens at your site. If you add markers, then you have to keep track of them by yourself, so also user access control is your own problem.
However, I wonder, what would happen when I would create my own map on the Google Maps website with my own markers, and then I would display this map on my site. What would be then the way to read out the markers, lets say for a list of markers.
It seems that the right way is to implement it all yourself. Let user set marker, save the marker in database. Review the marker and if accepted mark it and display it on the public map when populating the map with your markers.
Ok, so I've been reading around and I found out, that obviously Google Maps does not provide a function to read out all markers on a map: how to get all markers on google-maps-v3

Real-Time update of markers in google maps?

thats my scenario: I want to load a list of places of interest of a user based on his location (using HTML5 geolocation). But the problem is, I have a very big list of places (I don't want to have to load all places from my database), so the solution I have adopted until now is only to call mysql for the results in a given radius from the user, let's say, 1 km. But I'd like when user is dragging google maps to explore the map, load progressively the places for the area is shown on the map (basically something similar to what foursquare does).
Is there any simple way to achieve that? Hope I was clear with the question, thanks in advance, any help is appreciated.
Jesús.
General approach:
get the bounds of the map and query your data base for markers that are currently in view
optional, add padding to the bounds so some markers are available just out of view if the map is dragged
display the resulting markers
when the map is moved (bounds_changed event), query your database for additional markers
process through the returned markers, only adding those that are new (requires an array of existing markers and a way to determine that the existing marker and a newly downloaded marker are the same)
Searching the Google Maps API v3 group (and the Google Maps API v2 group, the concepts will apply but the code samples may not) should give you some examples.

Is it possible to create an InfoWindow using the Google Maps API V3 that is populated via Google?

If one puts in an address or set of coordinates into Google Maps (the web interface), it will create a set of one or more markers representing your search results on the map. You can click these markers to show an information callout that has data such as the phone number or reviews of the place.
I'd like to emulate this feature in a map on a web page I am building using Google Maps V3. I have successfully created a marker with custom icon and invoked an InfoWindow but I have to specify the content myself. Is there a way I can get the InfoWindow content for that street address/place as you would if you used Google Maps directly? I've seen a few references to the Google Places API, but I would have to extract and style the information myself which would require more time than I have in my budget. Is this the only way?
Thanks,
Steve
You need to do some reverse geocoding
http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding
Here is an example:
http://code.google.com/p/gmaps-samples-v3/source/browse/trunk/io-2010-bootcamp/v3-reverse-geocode.html?r=204

Adding pin points to google map with static list of street addresses

I have a spreadsheet full of street addresses and I want to add them as pin points on a google map. Can anybody tell me if they must be converted to a geo-code to work with the google maps API? And if so, is there a tool that will output a list of addresses in a way where I can just plug it into some javascript and have it good to go?
... Or just some tips. I've never worked with the google maps API before.
You will need to geocode the street addresses to convert them to latitude/longitude values for your marker objects in Google Maps.
Since you have a static list of addresses, you probably just want to do the geocoding once, get the latitude/longitude values and associate them with the data points your have in the spreadsheet.
Once you have your data points with latitude/longitude associated, you can spin through them creating markers for each one. When you create your marker object, you specify a google.maps.LatLng object in the options:
var marker = new google.maps.Marker({
position: new google.maps.LatLng(myLatitude, myLongitude),
map: map,
title:"Hello World!"});
The map property on the options associates the new marker with the map object.
There's a free add-on for Google Spreadsheets called GeoSheets that makes it easy to geocode your list of addresses directly from the spreadsheet. You can also use GeoSheets to create a customizable and embeddable map to put on your website that can automatically update with each change to the data in your spreadsheet.

How to build our own user define

Can we create a user define custom base google map on which we can add our predefine landmark points?
Now in application we access google map with original information. Our GPS device returns location of current point with some description such as your vehicle is .. distance away from some xxx location.
So can we build to some user define google map on which we can add custom landmarks on google map, then we access that custom url to access google map.
You can create a customized google map page, with your own landmark points. You need to check out the Google Maps API Reference.
To create markers ('predefined landmark points') on the map you need to instantiate GMarker objects in Javascript using your latitude, longitude data.
Not quite clear on the last part of your question, but if you asking about linking to Google Maps at a particular latitude longitude, you can build a URL to do that:
http://maps.google.com.au/?ll=<latitude>,<longitude>&spn=<degrees high>,<degrees wide>
For example:
http://maps.google.com.au/?ll=-15.623037,18.388672&spn=65.61535,79.013672