Techtolia ✓

Techtolia ✓

1609258467

Google Maps | Places - Geocoding | Search - Select - Collect

Demo: https://techtolia.com/GoogleMaps/index.html

With integrating the module to your web forms, users can easily select the address and you can easily collect exact address details.

Module uses Google Maps JavaScript API, Places API and Geocoding API.

Maps JavaScript API lets customize maps.
Places API lets users search and find places with autocomplete filling.

Geocoding API lets selected location coordinates convert to address.

Full source code is included.

What is Google Maps and Api?

Build customized, agile experiences that bring the real world to your users with static and dynamic maps.

Place Search returns a list of places based on a user’s search string.

Place Details returns more detailed information about a specific place.

Place Autocomplete automatically fills in the name and/or address of a place as users type.

Reverse geocoding is the process of converting geographic coordinates into a human-readable address.

Google MapsGoogle Maps

https://techtolia.medium.com/google-maps-places-geocoding-search-select-collect-4483e7b1cdbd

#google-maps #geocoding #search #places #autocomplate

What is GEEK

Buddha Community

Google Maps | Places - Geocoding | Search - Select - Collect

Seat Reservation With Jquery And Php

Seat Reservation with jQuery

In my Online Bus Reservation System project, I got queries from many people about how to implement seat selection screen effectively. So, I decided to write on it. This post explains how to implement seat booking with jQuery. It can be used in online Bus, flight, hotel, exam support, cinema and ticket booking system.

 

seat reservation jquery

HTML:

<h2> Choose seats by clicking the corresponding seat in the layout below:</h2>

    <div id="holder">

        <ul  id="place">

        </ul>   

    </div>

    <div style="float:left;">

    <ul id="seatDescription">

        <li style="background:url('images/available_seat_img.gif') no-repeat scroll 0 0 transparent;">Available Seat</li>

        <li style="background:url('images/booked_seat_img.gif') no-repeat scroll 0 0 transparent;">Booked Seat</li>

        <li style="background:url('images/selected_seat_img.gif') no-repeat scroll 0 0 transparent;">Selected Seat</li>

    </ul>

    </div>

        <div style="clear:both;width:100%">

        <input type="button" id="btnShowNew" value="Show Selected Seats" />

        <input type="button" id="btnShow" value="Show All" />          

        </div>

We will add seats in “#place” element using javascript.

Settings:

To make it generalize, settings object is used.

var settings = {

               rows: 5,

               cols: 15,

               rowCssPrefix: 'row-',

               colCssPrefix: 'col-',

               seatWidth: 35,

               seatHeight: 35,

               seatCss: 'seat',

               selectedSeatCss: 'selectedSeat',

               selectingSeatCss: 'selectingSeat'

           };

rows: total number of rows of seats.
cols: total number of seats in each row.
rowCssPrefix: will be used to customize row layout using (rowCssPrefix + row number) css class.
colCssPrefix: will be used to customize column using (colCssPrefix + column number) css class.
seatWidth: width of seat.
seatHeight: height of seat.
seatCss: css class of seat.
selectedSeatCss: css class of already booked seats.
selectingSeatCss: css class of selected seats.

Seat Layout:

We will create basic layout of seats.

var init = function (reservedSeat) {

                var str = [], seatNo, className;

                for (i = 0; i < settings.rows; i++) {

                    for (j = 0; j < settings.cols; j++) {

                        seatNo = (i + j * settings.rows + 1);

                        className = settings.seatCss + ' ' + settings.rowCssPrefix + i.toString() + ' ' + settings.colCssPrefix + j.toString();

                        if ($.isArray(reservedSeat) && $.inArray(seatNo, reservedSeat) != -1) {

                            className += ' ' + settings.selectedSeatCss;

                        }

                        str.push('<li class="' + className + '"' +

                                  'style="top:' + (i * settings.seatHeight).toString() + 'px;left:' + (j * settings.seatWidth).toString() + 'px">' +

                                  '<a title="' + seatNo + '">' + seatNo + '</a>' +

                                  '</li>');

                    }

                }

                $('#place').html(str.join(''));

            };

            //case I: Show from starting

            //init();

            //Case II: If already booked

            var bookedSeats = [5, 10, 25];

            init(bookedSeats);

 

init method is used to draw seats layout. Already booked seats array will be passed as argument of this method.

Seat Selection:

?

$('.' + settings.seatCss).click(function () {

if ($(this).hasClass(settings.selectedSeatCss)){

    alert('This seat is already reserved');

}

else{

    $(this).toggleClass(settings.selectingSeatCss);

    }

});

$('#btnShow').click(function () {

    var str = [];

    $.each($('#place li.' + settings.selectedSeatCss + ' a, #place li.'+ settings.selectingSeatCss + ' a'), function (index, value) {

        str.push($(this).attr('title'));

    });

    alert(str.join(','));

})

$('#btnShowNew').click(function () {

    var str = [], item;

    $.each($('#place li.' + settings.selectingSeatCss + ' a'), function (index, value) {

        item = $(this).attr('title');                  

        str.push(item);                  

    });

    alert(str.join(','));

})

When user clicks on available seat, it is selected and second click on same seat will unselect seat. Button “Show All” will show all booked seat numbers and “Show Selected Seats” will show selected seats only.

CSS:

?

#holder{   

height:200px;   

width:550px;

background-color:#F5F5F5;

border:1px solid #A4A4A4;

margin-left:10px;  

}

#place {

position:relative;

margin:7px;

}

#place a{

font-size:0.6em;

}

#place li

{

 list-style: none outside none;

 position: absolute;  

}   

#place li:hover

{

background-color:yellow;     

}

#place .seat{

background:url("images/available_seat_img.gif") no-repeat scroll 0 0 transparent;

height:33px;

width:33px;

display:block;  

}

#place .selectedSeat

{

background-image:url("images/booked_seat_img.gif");         

}

#place .selectingSeat

{

background-image:url("images/selected_seat_img.gif");       

}

#place .row-3, #place .row-4{

margin-top:10px;

}

#seatDescription li{

verticle-align:middle;   

list-style: none outside none;

padding-left:35px;

height:35px;

float:left;

}

In my next post, you will get how to use this in asp.net project with sql server database .
https://www.pakainfo.com/seat-reservation-with-jquery-and-php/

Techtolia ✓

Techtolia ✓

1609258467

Google Maps | Places - Geocoding | Search - Select - Collect

Demo: https://techtolia.com/GoogleMaps/index.html

With integrating the module to your web forms, users can easily select the address and you can easily collect exact address details.

Module uses Google Maps JavaScript API, Places API and Geocoding API.

Maps JavaScript API lets customize maps.
Places API lets users search and find places with autocomplete filling.

Geocoding API lets selected location coordinates convert to address.

Full source code is included.

What is Google Maps and Api?

Build customized, agile experiences that bring the real world to your users with static and dynamic maps.

Place Search returns a list of places based on a user’s search string.

Place Details returns more detailed information about a specific place.

Place Autocomplete automatically fills in the name and/or address of a place as users type.

Reverse geocoding is the process of converting geographic coordinates into a human-readable address.

Google MapsGoogle Maps

https://techtolia.medium.com/google-maps-places-geocoding-search-select-collect-4483e7b1cdbd

#google-maps #geocoding #search #places #autocomplate

I am Developer

1614263355

Google Places Autocomplete In PHP with Example

PHP 8 google address autocompletes without showing the map. In this tutorial, i will show youhow to create a google autocomplete address web app using google address APIs in PHP.

Note that, Google autocomplete address API will return address and as well as latitude, longitude, place code, state, city, country, etc. Using latitude and longitude of address, you can show markers location in google map dynamically in php.

This tutorial guide to you step by step how to implement google places autocomplete address web application without showing google maps in PHP.

For implementing the autocomplete address in php, you will have to get the key from google console app. So, just go to the link https://cloud.google.com and get the google API key.

https://www.tutsmake.com/php-google-places-autocomplete-example/

#autocomplete address google api php #google places autocomplete example in php #google places autocomplete example without map in php #php google places autocomplete jquery #php google places autocomplete jquery example

Mitchel  Carter

Mitchel Carter

1603627200

Google Maps Location Sharing Not Updating

In this blog post, I will discuss how to fix google maps location sharing not updating or not working and also will unable to refresh Google maps sharing location issues. By using Google location sharing features you can choose who can find your current location for what length of time. It is important to show the updated location that you can share with your family or friends so that they can receive you or show you the right path to access at your right location simply.

Why is Google Maps Location Sharing Not Updating?

In our day to day life, we use it a lot to find places, explore businesses, and share locations with friends. However, In addition to these, sometimes Google maps also experience one major issue that is “Google maps location sharing not working”. Find the below list of solutions to resolve the issue:-

Solution 1: Check your Wi-Fi or Cellular Signal

Make sure that you have the proper internet connection available on a device that you are using to use Google Maps. You can also switch to the cellular data from your Wi-Fi connection.

Solution 2: Update Google Maps app

Using an outdated Google Maps app version may cause plenty of technical issues and you can easily resolve this issue after updating your app to the latest version.

Solution 3: Restart your device

It is one of the best solutions to resolve all kinds of Google Maps related issues. You can easily access the Google Maps app after restarting your preferred device.

Why can’t I refresh someone’s location on Google Maps?

It’s another issue among the users that Google Maps stopped location sharing refreshing. There could be plenty of reasons for this problem. Some of the most common issues of this problem listed below:-

  • Improper internet connectivity.
  • Outdated app version.
  • Caches and data.
  • Compatibility issues.
  • Using the incompatible device.
  • Network connection issues.
  • Calibration issues.

References: How to share real-time location with others

Conclusion

I hope you liked this article on Why google maps location sharing not updating, and google maps location sharing not working. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

#google maps api #google maps location sharing not updating #google maps location sharing not working #google maps location sharing unable to refresh

Google Maps Draggable Marker Get Coordinates

In this blog post, you will learn how to create google maps draggable marker using Google Maps Javascript API v3, and when you drag the marker position then get coordinates (latitude and longitude) of that location where you place the marker.

How to make a marker draggable?

To allow users to drag a marker to a different location on the map, set the draggable attribute to true in the marker options.

var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
var mapOptions = {
  zoom: 4,
  center: myLatlng
}
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
// Place a draggable marker on the map
var marker = new google.maps.Marker({
    position: myLatlng,
    map: map,
    draggable:true,
    title:"Drag me!"
});

#google maps api #javascript #draggable marker google maps v3 example #google maps draggable marker #google maps draggable marker get coordinates