Hello, i want to know, is there any way to force user can only select the address provided in dropdown list? Currently everything working well, but user can proceed without select the address from the dropdown list, can anyone help? Thanks in advance <input type="text" class="form-control" id="address" name="address" required> <script> options = { language: 'en-AU', types: ['geocode'], componentRestrictions: { country: "my" } } var autocomplete = new google.maps.places.Autocomplete($("#address")[0], options); google.maps.event.addListener(autocomplete, 'place_changed', function() { var place = autocomplete.getPlace(); console.log(place.address_components); }); </script>

Member Avatar
Member Avatar
+0 forum 5

I want to create circle around marker but im having some troubles i have this code Circle circle = mMap.addCircle(new CircleOptions() .center(new LatLng(-33.87365, 151.20689)) .radius(10000) .strokeColor(Color.RED) .fillColor(Color.BLUE)); this code is drawing circle around Sydney but i want to create where i place the marker here is the code together with the marker creation: mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() { @Override public void onMapClick(LatLng latLng) { // Creating a marker MarkerOptions markerOptions = new MarkerOptions(); // Setting the position for the marker markerOptions.position(latLng); // Setting the title for the marker. // This will be displayed on taping the marker markerOptions.title(latLng.latitude + " : " …

Member Avatar
+0 forum 0

I'm not sure if this should be in this forum but I figured it was a good starting place. I am creating a database that, among other things, allows users to input a store's location (e.g. name, address, etc). Once a store has been added, there is an ability to go into a single store's "page" to view all of it's information including name, contact info, reviews, comments, etc. What I would really like is the ability for a Google Map to generate automatically when the page loads with the store's name and address listed (and pulled up in the …

Member Avatar
Member Avatar
+0 forum 6

Hello Guys, i have a one html5 website, i had added google maps on my contact us page, while i checking that on mobile, the map (google map iframe) shows as a default width, is it possible to change the width regarding media query.

Member Avatar
Member Avatar
+0 forum 2

This is what I was trying to do: The user enters an address, which is autocompleted by Google. Then when they press the submit button, an alert box pops up, telling them whether the address entered is within 5 miles of (42.352487, -71.079290). Then a confirm box pops up asking if they would like to proceed to the next page. Nothing happens when I click the submit button. codeAddress() is never triggered. How can I get the button to work? Also, I would appreciate any tips or glaringly obvious errors that you notice. I'm still new to Javascript. Here is …

Member Avatar
Member Avatar
+0 forum 7

Hi All, I'm trying to display a postal area on Google Maps API within it's boundaries. I want to do this dynamically so that everytime someone changes the text in a text field (entering a postcode or part of), it checks the postcode and calculates the boundaries then displays them. My current issue is that I cannot get the map to refresh after each keyup. My code is as follows: var map; var postCodePlot; var postCodeBorderCoords = []; function initialize() { //alert("initialize called"); var mapProp = { center: new google.maps.LatLng(51.55777197508853, -0.13395323779611973), zoom:14, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("googleMap"),mapProp); // …

Member Avatar
Member Avatar
+0 forum 2

i wrote a (visual basic.net-2008) desktop app that allows ham radio operators to enter a call, such as WA0H, and the program gives the ham's location (springfield, mo.). you can download the program free from my website .. www.wa0h.com i want the program to display the ham's location on a google map using google's api-v3. i have created an (html/javascript) webpage, where you enter the location in a form box, click a (find) button, and the app displays the map ok, including a marker pin on the map. ??? how do i run the (webpage) from inside my (vb.net) program …

Member Avatar
Member Avatar
+0 forum 6

Dear Readers! I would like to ask your kind help about showing just the selected markers in Google Maps API V3. I have a HTML select -> <select onchange="appartments()" id="selectField"> <option value="appartment1">Choose one appartment...</option> <option value="appartment2">1052 Budapest, Galamb u. 3.</option> <option value="appartment3">1052 Budapest, Régi posta u. 11.</option> <option value="appartment4">1052 Budapest, Régi posta u. 14.</option> <option value="appartment5">1051 Budapest, Vörösmarty tér 2.</option> <option value="appartment6">1066 Budapest, Ó u. 5.</option> </select> I have the API V3 and the markers -> function appartments() { var get_id = document.getElementById('selectField'); console.log(get_id); var result = get_id.options[get_id.selectedIndex].value; } IF ELSE HERE! var marker = new google.maps.Marker(); marker.setPosition(new google.maps.LatLng(47.5037832, 19.0575725)); …

Member Avatar
+0 forum 0

I'm creating multiple custom info windows using only one xml layout, all of the info inside the window will be put In programmatically. I am now trying to give the ImageView an image but when I do that for one marker all of the other markers ImageView images become the same, any idea why? final Bitmap bmp = BitmapFactory.decodeByteArray(data, 0,data.length); if(postc.getAuthor().getObjectId().equals(ParseUser.getCurrentUser().getObjectId())){ Marker oldMarker = mapMarkers.get(postc.getObjectId()); final MarkerOptions MarkerT = new MarkerOptions().snippet(postc.getTContent()); MarkerT.title(postc.getAuthor().getUsername()); MarkerT.position(new LatLng(postc.getLat(), postc.getLong())); MarkerT.icon(BitmapDescriptorFactory.fromBitmap(bmp)); final Marker markeri = map.addMarker(MarkerT); map.setInfoWindowAdapter(new InfoWindowAdapter(){ @Override public View getInfoContents(final Marker marker) { View v = getLayoutInflater().inflate(R.layout.custommarker, null); final LinearLayout ll = (LinearLayout)v.findViewById(R.id.ll); …

Member Avatar
Member Avatar
+0 forum 1

hi please help me. i have a google map on my website, but i cant get it to zoom out to show the circle radius, and it seems to be zooming only to view the markers. how can i zoom out to show the radius of the map? see below the javascript code i currently have class SphericalGeometry { const EQUALS_MARGIN_ERROR = 1.0E-9; // Earth's radius (at the Ecuator) of 6378137 meters. const EARTH_RADIUS = 6378137; public static function getEarthRadius() { return self::EARTH_RADIUS; } /** * Computes a bounding rectangle (LatLngBounds instance) from a point and a given radius. * …

Member Avatar
Member Avatar
+0 forum 1

hi I using PHP/MySQL with Google Maps from here https://developers.google.com/maps/articles/phpsqlajax_v3 and then I used PHP's DOM functions to Output XML from here https://developers.google.com/maps/articles/phpsqlajax_v3#outputxml everything working fine with me but I need to center google map on the marker. here is the code that center the map and make the zoom on the map function load() { var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(30.0599153,31.2620199,13), zoom: 13, mapTypeId: 'roadmap' }); how to make this line `center: new google.maps.LatLng(30.0599153,31.2620199,13),` to be dynamic centered by the marker thanks

Member Avatar
Member Avatar
+0 forum 9

please help me to generate maps based on given values from the database(eg longitude and latitude,depth,salinity etc) please help me wid the code.

Member Avatar
Member Avatar
+0 forum 1

Hi! I am trying to make a small application with google maps! I have successfully addded few points on the map using xml output to php from mysql database.. function load() { var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(38.99,22.49), zoom: 7, mapTypeId: 'roadmap' }); var infoWindow = new google.maps.InfoWindow; // Change this depending on the name of your PHP file downloadUrl("phpsqlajax_genxml2.php", function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var info = markers[i].getAttribute("info"); var type = markers[i].getAttribute("type"); var point = new google.maps.LatLng( …

Member Avatar
Member Avatar
+0 forum 3

Now the Pinterest — the virtual pinboard has introduced Place Pins. **Place Pins? What is it?** Actually like the other pins Place pins are same except they have places attached to them. A new mapping tool has been intoduced by the Pintrest to help you put places city or the location to the pin. This means to help you oout in planning the places you'll go and the things you'll do once you get there. You can add a map to an existing board, or create a new board for your interactive map, and start pinning photos.

Member Avatar
Member Avatar
+2 forum 8

I am having problems displaying a map. Data in ListView is showing on the page but the map is missing. I would appreciate some help. Here is what I have so far: The following pieces of code are in MyDirectory.Master page: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> function init_map(map_canvas_id, lat, lng, zoomLevel, markers) { var myLatLng = new google.maps.LatLng(lat, lng); var options = { zoom: zoomLevel, center: myLatLng, mapTypeId: google.maps.MapTypeId.HYBRID }; var map_canvas = document.getElementById(map_canvas_id); var map = new google.maps.Map(map_canvas, options); var bounds = new google.maps.LatLngBounds(); // Place markers for (var i = 0; i < markers.length; i++) { var marker = new …

Member Avatar
Member Avatar
+0 forum 4

Sadly I have never really been many places, and one day I can't wait to travel and see other countries. In the mean time, I have been having fun (and wasting tons of time) playing around with this http://www.mapcrunch.com

Member Avatar
Member Avatar
+0 forum 1

Hello, I have a problem with my php script. Everything works fine except when i will write the data to the database. I get a error Warning: **Wrong parameter count for mysql_query()** Here is my code: <?php include('../sec/inc_mysql_connect.php'); include 'googledistance.class.php'; $sql = "SELECT VVBnummer, Adres, Postcode FROM tblscheidsrechters";// echo($sql); $result = mysql_query($sql); $sql_sh = "SELECT ID, SporthalAdres, Postcode FROM tblsporthal"; //echo('<br>' . $sql_sh); $result_sh = mysql_query($sql_sh); while($record = mysql_fetch_array($result)) { while($record_sh = mysql_fetch_array($result_sh)) { $fromAddress = $record['Adres'] . ',' . $record['Postcode']; //echo($fromAddress . '<br>'); $toaddress = $record_sh['SporthalAdres'] . ',' . $record_sh['Postcode']; //echo($toaddress . '<br>'); $gd = new GoogleDistance($fromAddress, $toaddress); $vvb …

Member Avatar
Member Avatar
+0 forum 4

Can You Please exaplain what **0**(ZERO),geocode=**0**,33.32032770893669,-111.96618234118574) represents geocode parameters of below url https://maps.google.com/maps?f=d&hl=en&saddr=&daddr=7200+West+Ray+Road,+Chandler,+AZ+85226,+USA&geocode=0,33.32032770893669,-111.96618234118574

Member Avatar
Member Avatar
+0 forum 2

I have been developing my first (real estate) web page for a few months and that's all my experience with programming... So forgive me if this is a stupid question. I have been following basically 3 tutorials ([first](http://www.domagojsalopek.com/Details/Display-locations-from-a-database-on-a-map-using-Google-Maps-JavaScript-API-and-PHP/22), [second](http://www.geocodezip.com/v3_MW_example_categories.html) and [third](http://gmaps-samples-v3.googlecode.com/svn/trunk/articles/phpsqlsearch/phpsqlsearch_map.html)). They are kind of working together with a few problems. The multiple and intersecting filtration is beyond my humble knowledge.... Here is what I need to accomplish with a example: 123 Abc St, Somewhere, USA 3 Bedrooms, 2 baths, 99999-123, Victorian, Probate, Garage:Yes, Fixer etc (there are other categories). 123 Abc St, Nowehere, USA, 3 Bedrooms, 2 baths, 99123-999, …

Member Avatar
Member Avatar
+0 forum 4

How do I specify a mouseDown eventhandler to dynaically creted Tpanels? My intention is to create a number of panels, like tiles, and move them around on the Form I have created a design time TPanel and copied its OnMouseDown event and saved it as PanelMouseDown. My code: Pan:=TPanel.Create(Form2); Pan.Height:=60; Pan.Width:=60; Pan.Parent:=Form2; Pan.DragMode:=dmManual; Pan.OnMouseDown :=Form2.PanelMouseDown; I cant get the panels to react on mouseclicks. Does somebody have any suggestions?

Member Avatar
Member Avatar
+0 forum 4

Hi all, I wrote a simple app that shows your current location depends on GPS, WiFi, 3G signals, and shows in a Text View the location as city,street, country. The problem is that I saw that the location is pretty updated with WiFi\ 3G \ GPS, but the Text View does not updating at all !! I attached my code and I'll be more than happy if anyone could point of the problems in my app. Sorry for the long thread, I found no other way to paste the code more cost-effective placeץ I am really desperate with it because …

Member Avatar
Member Avatar
+0 forum 2

I am currently developing an iOS mobile application that uses that Google Maps SDK. The problem I'm having is that I cannot control the boundries in which the map loads. The map loads properly, and displays the proper coordinates, but I cannot figure out how to adjust the size of the map within the application. Any ideas?

Member Avatar
Member Avatar
+0 forum 1

I run a script where users can select locations from dynamic select menu. When a user selects his location, a google map should load on the page. I have 2 problems on this issue. Pls help me fix them: 1) Map is loading, but it can't mark the place. I need a marker, tried some codes posted on this forum, but they don't work. 2) Map should be loaded based on selected location. But my code can only fetch default map. Here's the entire code: -------- <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Google Maps JavaScript API …

Member Avatar
Member Avatar
+0 forum 2

Hello, I have this Windows Phone app I need to do that gets information from the Google places API about places that the user searches for. For each place I need to have a pushpin on a bing map I have inserted. The problem is that I'm a newbie in c# and I don't know how to do what I need. I need to customize each pushpin so that it shows its content when it's tapped on. Also, I want the content to be a textBlock a small image and a button (or icon) for directions from a pushpin designated …

Member Avatar
+0 forum 0

I have a table that has information of fire departments around the state. I am trying to set up the gridview so that the address is a hyperlink with google maps. For example, In my address column, I have an address such as 745 W Colfax Ave Denver CO 80204, I want to change it so the DataNavigateUrlFormatString would read "https://maps.google.com/maps?q=" + the address with the spaces replaced with a '+' symbol so it would end up being like this [745 W Colfax Ave Denver CO 80204](https://maps.google.com/maps?q=745+W+Colfax+Ave+Denver+CO+80204). Here's my ASP.Net code snippet: <Columns> <asp:BoundField DataField="resource" HeaderText="Resource" /> <asp:BoundField DataField="name" HeaderText="Name" …

Member Avatar
Member Avatar
+0 forum 3

Dear Sirs! I have this php syntax in my <head>. <?php // MySQL mysql_connect("localhost", "fundis_petrol", "petrol123") or die(mysql_error()); mysql_select_db("fundis_petrol") or die(mysql_error()); // Table $result = mysql_query("SELECT * FROM `fillingstations` LIMIT 0 , 30") or die(mysql_error()); // Print while($row = mysql_fetch_array($result)){ echo $row[2]; } ?> And I also have this JS (Google Maps API) in my <head>. var beaches = [ ['Miskolci road / Shell Station', <?php echo $row[2]; ?> , 4], ['Szabadsag utja / Töltöallomas', 47.559025, 19.281415, 5], ['Cronulla Beach', -34.028249, 151.157507, 3], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], ['Maroubra Beach', -33.950198, 151.259302, 1] ]; But when I try to echo …

Member Avatar
Member Avatar
+0 forum 5

I developed an Android FlagGuessEnRu game, but I want upon success flag guess go to Google Maps(browser or MapView) for that flag/country, with appropriate scaling of the Map per country, well i get countries from wikipedia, what url to use for google map for a particular country, how from country name get map?

Member Avatar
Member Avatar
+0 forum 3

Hi all, Anyone here have experience with using MapInnovations to add driving directions to a website? I have a client asking about it and want some opinions regarding how it runs and how easy it is to add to a site. I'm getting the code off the site: MapInnovations.com Thanks! Bobby

Member Avatar
Member Avatar
+0 forum 1

Hey, I have the following code and I am trying to get Google Maps API to add a parker to each location and thats working fine! However, I cant seem to get my tab's working in each info window? Here is my code: <script type="text/javascript"> var locations = [ ['Jackson Building Centre',-0.4826353,52.6536] ,['Branch Bros',-0.3607193,52.76558] ,['Travis Perkins',-0.265679,52.59274] ,['B&Q',-0.2619155,52.59574] ,['Jackson Building Centre',-0.7319806,52.67846] ,['Travis Perkins',-0.733384,52.67385] ,['E H Smith',-0.2589442,52.56156] ,['Travis Perkins',-0.6792181,52.50691] ,['Jackson Building Centre',-0.674857,52.49121] ,['Travis Perkins',-0.214717,52.57708] ,['Andrews BS',-0.2089594,52.57337] ,['Buildbase',-0.540852,52.39677] ,['Buildbase',-0.166964,52.55641] ]; var map = new google.maps.Map(document.getElementById('map_canvas'), { zoom: 2, center: new google.maps.LatLng(54.21327711884562, -3.9951935000000276), mapTypeId: google.maps.MapTypeId.ROADMAP }); var infowindow = new google.maps.InfoWindow(); var marker, i; …

Member Avatar
Member Avatar
+0 forum 1

This question could probably be posted in several areas, but what I am writing is a google maps application and I'm also pulling feeds, so I'm choosing this as the main category to post this question in. Basically, I've pulled a feed from NOAA which gives me weather alerts. I would like to plot these areas on google maps, however, the geolocation coordinates they supply are 6 digit numbers which took me a few hours to find out what it is. It's a FIPS code - the first digit is the county subdivision, the first three digits are the state, …

Member Avatar
Member Avatar
+0 forum 2

The End.