i want to find my lat long in a particular area coordinates arrays in php
I want to find my lat-long exist or not in a particular area in PHP
Area coordinates JSON array ->
{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}
php json geolocation
add a comment |
I want to find my lat-long exist or not in a particular area in PHP
Area coordinates JSON array ->
{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}
php json geolocation
add a comment |
I want to find my lat-long exist or not in a particular area in PHP
Area coordinates JSON array ->
{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}
php json geolocation
I want to find my lat-long exist or not in a particular area in PHP
Area coordinates JSON array ->
{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}
php json geolocation
php json geolocation
edited Jan 3 at 5:05
Cœur
18.7k9110150
18.7k9110150
asked Jan 2 at 6:26
Gaurav ShrimaliGaurav Shrimali
17
17
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can use the json_decode
in php for this. You can find more on the function Here
<?php
$latsToCheck = array(
// ENTER LATITUDES HERE THAT YOU NEED TO CHECK
);
$langsToCheck = array(
// ENTER LONGITUDES HERE THAT YOU NEED TO CHECK
);
$str = '{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}';
$result = json_decode($str, true);
if (in_array($latsToCheck, $result['lat']) && in_array($langsToCheck, $result['lng'])) {
echo "co-ordinates exist";
} else {
echo "co-ordinates doesn't exist";
}
?>
Hope this helps.
add a comment |
Try below one
$latlngInfo = 'your lat lng json data';
$arrMixLatLang = json_decode($latlngInfo, 1);
// to check its available or not
if(in_array('lat value', $arrMixLatLang['lat']) && in_array('lng value', $arrMixLatLang['lng'])){
//Your statement
}
// to get index
$latindex = array_search('lat value', $arrMixLatLang['lat']);
$lngindex = array_search('lng value', $arrMixLatLang['lng']);
i found this Script and it's working for me stackoverflow.com/questions/5065039/find-point-in-polygon-php
– Gaurav Shrimali
Jan 2 at 9:24
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54002116%2fi-want-to-find-my-lat-long-in-a-particular-area-coordinates-arrays-in-php%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use the json_decode
in php for this. You can find more on the function Here
<?php
$latsToCheck = array(
// ENTER LATITUDES HERE THAT YOU NEED TO CHECK
);
$langsToCheck = array(
// ENTER LONGITUDES HERE THAT YOU NEED TO CHECK
);
$str = '{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}';
$result = json_decode($str, true);
if (in_array($latsToCheck, $result['lat']) && in_array($langsToCheck, $result['lng'])) {
echo "co-ordinates exist";
} else {
echo "co-ordinates doesn't exist";
}
?>
Hope this helps.
add a comment |
You can use the json_decode
in php for this. You can find more on the function Here
<?php
$latsToCheck = array(
// ENTER LATITUDES HERE THAT YOU NEED TO CHECK
);
$langsToCheck = array(
// ENTER LONGITUDES HERE THAT YOU NEED TO CHECK
);
$str = '{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}';
$result = json_decode($str, true);
if (in_array($latsToCheck, $result['lat']) && in_array($langsToCheck, $result['lng'])) {
echo "co-ordinates exist";
} else {
echo "co-ordinates doesn't exist";
}
?>
Hope this helps.
add a comment |
You can use the json_decode
in php for this. You can find more on the function Here
<?php
$latsToCheck = array(
// ENTER LATITUDES HERE THAT YOU NEED TO CHECK
);
$langsToCheck = array(
// ENTER LONGITUDES HERE THAT YOU NEED TO CHECK
);
$str = '{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}';
$result = json_decode($str, true);
if (in_array($latsToCheck, $result['lat']) && in_array($langsToCheck, $result['lng'])) {
echo "co-ordinates exist";
} else {
echo "co-ordinates doesn't exist";
}
?>
Hope this helps.
You can use the json_decode
in php for this. You can find more on the function Here
<?php
$latsToCheck = array(
// ENTER LATITUDES HERE THAT YOU NEED TO CHECK
);
$langsToCheck = array(
// ENTER LONGITUDES HERE THAT YOU NEED TO CHECK
);
$str = '{"lat":[21.39664174642479,21.39664174642479,21.39664174642479,21.39664174642479,21.38641226905212,21.38129726211495,21.376182076389874,21.371066711911467,21.365951168714215,21.36083544683268,21.355719546301387,21.350603467154897,21.34037077315456,21.33525415836984,21.33013736510819,21.31478591480751,21.30966840798403,21.304550722856618,21.29943285945987,21.289196597996938,21.2840782,21.27895962387228,21.27384086964844,21.268721937363132,21.263602827051027,21.268721937363132,21.268721937363132,21.27384086964844,21.27895962387228,21.2840782,21.289196597996938,21.294314817828436,21.30966840798403,21.31990324329242,21.33013736510819,21.33525415836984,21.34037077315456,21.345487209427773,21.350603467154897,21.355719546301387,21.36083544683268,21.371066711911467,21.376182076389874,21.38641226905212,21.39152709716691,21.39664174642479,21.401756216791277,21.406870508231872,21.41198462071206,21.41198462071206,21.406870508231872,21.401756216791277],"lng":[40.44953843828125,40.45503160234375,40.46601793046875,40.47151109453125,40.48799058671875,40.49348375078125,40.49897691484375,40.50447007890625,40.50447007890625,40.50996324296875,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.51545640703125,40.50996324296875,40.50447007890625,40.49897691484375,40.48249742265625,40.47700425859375,40.46601793046875,40.46052476640625,40.45503160234375,40.44953843828125,40.43855211015625,40.42756578203125,40.41657945390625,40.40559312578125,40.40559312578125,40.40559312578125,40.40559312578125,40.41108628984375,40.42207261796875,40.42207261796875,40.42756578203125,40.42756578203125,40.43305894609375,40.43305894609375,40.43305894609375,40.43305894609375,40.44404527421875,40.44953843828125,40.45503160234375,40.46601793046875,40.47700425859375]}';
$result = json_decode($str, true);
if (in_array($latsToCheck, $result['lat']) && in_array($langsToCheck, $result['lng'])) {
echo "co-ordinates exist";
} else {
echo "co-ordinates doesn't exist";
}
?>
Hope this helps.
answered Jan 2 at 6:41
Kishen NagarajuKishen Nagaraju
1,140113
1,140113
add a comment |
add a comment |
Try below one
$latlngInfo = 'your lat lng json data';
$arrMixLatLang = json_decode($latlngInfo, 1);
// to check its available or not
if(in_array('lat value', $arrMixLatLang['lat']) && in_array('lng value', $arrMixLatLang['lng'])){
//Your statement
}
// to get index
$latindex = array_search('lat value', $arrMixLatLang['lat']);
$lngindex = array_search('lng value', $arrMixLatLang['lng']);
i found this Script and it's working for me stackoverflow.com/questions/5065039/find-point-in-polygon-php
– Gaurav Shrimali
Jan 2 at 9:24
add a comment |
Try below one
$latlngInfo = 'your lat lng json data';
$arrMixLatLang = json_decode($latlngInfo, 1);
// to check its available or not
if(in_array('lat value', $arrMixLatLang['lat']) && in_array('lng value', $arrMixLatLang['lng'])){
//Your statement
}
// to get index
$latindex = array_search('lat value', $arrMixLatLang['lat']);
$lngindex = array_search('lng value', $arrMixLatLang['lng']);
i found this Script and it's working for me stackoverflow.com/questions/5065039/find-point-in-polygon-php
– Gaurav Shrimali
Jan 2 at 9:24
add a comment |
Try below one
$latlngInfo = 'your lat lng json data';
$arrMixLatLang = json_decode($latlngInfo, 1);
// to check its available or not
if(in_array('lat value', $arrMixLatLang['lat']) && in_array('lng value', $arrMixLatLang['lng'])){
//Your statement
}
// to get index
$latindex = array_search('lat value', $arrMixLatLang['lat']);
$lngindex = array_search('lng value', $arrMixLatLang['lng']);
Try below one
$latlngInfo = 'your lat lng json data';
$arrMixLatLang = json_decode($latlngInfo, 1);
// to check its available or not
if(in_array('lat value', $arrMixLatLang['lat']) && in_array('lng value', $arrMixLatLang['lng'])){
//Your statement
}
// to get index
$latindex = array_search('lat value', $arrMixLatLang['lat']);
$lngindex = array_search('lng value', $arrMixLatLang['lng']);
answered Jan 2 at 6:42
Karthik SekarKarthik Sekar
41724
41724
i found this Script and it's working for me stackoverflow.com/questions/5065039/find-point-in-polygon-php
– Gaurav Shrimali
Jan 2 at 9:24
add a comment |
i found this Script and it's working for me stackoverflow.com/questions/5065039/find-point-in-polygon-php
– Gaurav Shrimali
Jan 2 at 9:24
i found this Script and it's working for me stackoverflow.com/questions/5065039/find-point-in-polygon-php
– Gaurav Shrimali
Jan 2 at 9:24
i found this Script and it's working for me stackoverflow.com/questions/5065039/find-point-in-polygon-php
– Gaurav Shrimali
Jan 2 at 9:24
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54002116%2fi-want-to-find-my-lat-long-in-a-particular-area-coordinates-arrays-in-php%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown