JSFiddle - React, Tailwind, and code Playground
by Osama Qassar
HTML
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script src="//maps.google.com/maps/api/js?libraries=placeses,visualization,drawing,geometry,places"></script>
<script src="//code.angularjs.org/1.7.0/angular.js"></script>
<script src="//rawgit.com/allenhwkim/angularjs-google-maps/master/build/scripts/ng-map.min.js"></script>
<script>
angular.module('myApp', ['ngMap'])
.controller("myCntrl", function ($scope) {
var _lat1 =41.012558 ;
var _lon1 =28.828503;
$scope.lat = _lat1;
$scope.lon = _lon1;
$scope.positions = [{pos:[$scope.lat, $scope.lon],name:"User"}];
$scope.center = [$scope.lat, $scope.lon];
$scope.query = " Regular Service,Hardware Faults,overall maintenance";
$scope.viewMap = false;
$scope.updateMap = function(dealer) {
$scope.lat1 = dealer.S_Latitude;
$scope.lon1 = dealer.S_Longitude;
$scope.positions = [{pos:[$scope.lat, $scope.lon],name:"User"}, {pos:[dealer.S_Latitude, dealer.S_Longitude],name:"Store"}];
$scope.viewMap = true;
//$scope.path = [[$scope.lat, $scope.lon], [dealer.S_Latitude, dealer.S_Longitude]];
}
$scope.dealers = [{
S_Email_id: "[email protected]",
S_Store: "samsung",
Store_Name: "طالب1",
S_Services: "Regular Service,Software Faults,Hardware Faults",
Store_long_description: "Undertake all kind of samsung mobiles",
Store_short_description: "Undertake all kind of samsung mobiles",
S_Latitude: "41.014114",
S_Longitude: "28.828350999999998",
S_clocation: ""
}, {
S_Email_id: "[email protected]",
S_Store: "nokia",
Store_Name: "طالب2",
S_Services: "Settings Faults,Regular Service,Hardware Faults",
Store_long_description: "Undertake all kind of nokia mobiles",
Store_short_description: "Undertake all kind of nokia mobiles",
S_Latitude:...