C# GMap | How to Search for a Location inside a Region | GMap - XVII
Вставка
- Опубліковано 27 сер 2024
- GMap Complete Guide(All Videos) - • GMap Complete Guide
GMap Part 1(How to load location on your map based on latitude and longitude?) - • C# - GMap - How to Dis...
GMap Part 2(How to plot a marker to our map?) - • C# GMAP - How to Plot ...
GMap Part 3(How to plot a map using our custom marker?) - • C# - GMAP - How to Cre...
GMap Part 4(How to disable the red cross?) - • C# - GMAP - How to Dis...
GMap Part 5(How to display route of two places?) - • C# GMAP - How to Get R...
GMap Part 6(How to get a distance between two places?) - • C# GMAP - How to Get D...
GMap Part 7(How to add a polygon on your map?) - • C# GMAP - How to Draw ...
GMap Part 8(How to remove already plotted markers, routes, and polygons from your map?) - • C# GMAP - How to Remov...
GMap Part 9(How to load a location on your map by using its address?) - • C# GMAP - How to load ...
GMap Part 10 (How to add a Mouse Click Event Handler to your Map) - • C# GMap - How to Load ...
GMap Part 11 (How to get a full address of a specific place on your Map?) - • C# GMap - How to Get a...
GMap Part 12 (How to Get an Address from Latitude and Longitude? - Fixing Bug) - • C# GMap - How to Get a...
GMap Part 13 (How to Enable Offline Map Feature?) - • C# GMap - How to Enabl... a
GMap Part 14 (Geocoding and Reverse Geocoding) - • C# GMap | Geocoding an...
GMap Part 15 (How to add ToolTip to your GMap Marker? | How to get Lat and Lng of the Marker?) - • C# GMap | How to Add T...
GMap Part 16 (How to extend feature of the GMap) - • C# GMap | How to Add A...
GMap Part 17 (How to Search for a location inside a Polygon) - • C# GMap | How to Searc...
GMap Complete Guide(All Videos) - • GMap Complete Guide
-----------------------------------------------------------------------------------------------------------
Please Subscribe to the Channel and leave a Comment below!
My Udemy Profile: www.udemy.com/...
My Udemy Courses:
Learn all about JSON from www.udemy.com/...
** Free - Learn how to deploy your local website to Heroku with Database Connection from www.udemy.com/...
Hi Balaji, you did a great job here, it helped me a lot.
Is there a way to change the language of the displayed cities? As I sit in Germany most of the citynames are displayed in english instead of german.
Hi Balaji, Thank you so much for your videos, this has helped me so much, I appreciate your work, I have a question: Is it possible to drag a marker and get the new co-ordinates?
Hey Lucian,
Glad to hear that my video helped you. I haven't tried marker dragging. But, I'll try it and let you know.
Thanks Balaji, I'm also working on it, will let you know if i have a solution.
Hello. I watched all your videos and helped me a lot to develop my aplication at work. It is an traffic jam detection app. I have a question: Is it possible to display multiple routes between 2 places and let the user to select the one he want, like google map app does? I will apreciate if you answer me as fast as you can. Thanks again !
Hey Fabin,
I'm so glad to hear that my video helped you to do your project. Regarding the multiple routes for a same source and destination, yes, it's possible. I fetched those details by directly consuming the Google Direction API. I haven't tested that in the GMap wrapper package.
But most probably that is possible. Because the GMap package that we are consuming is just a wrapper of the Google's API, mostly we can do all the things are possible in the API also in this package.
Current I can't test it due to some reason. But still if you want my private help, contact me via mail.
@@ProgramWithBalaji thank you so much. I will contact you if need it
@@fabianjichi5004 Ready to help you at anytime
@@ProgramWithBalaji I can't find you email adress. I would like your help if you want to do this. Thank you !
It's there in the about section of my channel. Visit my channel from your laptop and not from your mobile.
I'm trying to create a mapping application that works in the UK via PostCode lookup. Do you have any tips on how to achieve this?
Hey Joseph,
I recommend you to watch my tutorial on Geocoding and reverse geocoding from C# - API Consumption and JSON Parsing: ua-cam.com/play/PLlD7n_T-mUjUCk2CkkE_o6DeQnbImIc8D.html
I'm sure that my above tutorial will help you. If you have any queries, let me know :)
Hi Balaji,
I used gmap for my project and I created setup file but I token 0x8007007E Error. Do you know solution of my problem?
Good
Thanks Bro.
Hi Balaji, Im getting GMap.NET.RouteStatusCode.UNKNOWN_ERROR when i try to search if a point is inside of the polygon. Do u have any idea why of the error ?
Do you have an API key?
@@ProgramWithBalaji yes! Im using it to do georeverse and its working ok.!
@@santoniiflor Then, try searching for some other points. Check whether you are getting the same results for any point.
Is it working? If not, share your code with me
@@ProgramWithBalaji how can i reference the api key into this method ? Because im using it, for example to get routes and works okey!
How to search a keyword inside a polygon?
hi bro, can u share full source code? plz
poderia postar o link do projeto
download Link ??
I haven't uploaded the complete source code. Here is the source code of this module.
private void btnSearchInsidePoly_Click(object sender, EventArgs e)
{
var pointToSearch = new PointLatLng(Convert.ToDouble(txtLat.Text), Convert.ToDouble(txtLng.Text));
if (!SearchInsidePolygons(pointToSearch) && !SearchInPolygons(pointToSearch))
{
MessageBox.Show("Location Not Found");
}
else
{
MessageBox.Show("Location Found");
}
}
private bool SearchInPolygons(PointLatLng pointToSearch)
{
var overlays = map.Overlays;
foreach (var overlay in overlays)
{
var polygons = overlay.Polygons;
foreach (var polygon in polygons)
{
foreach (var point in polygon.Points)
{
if (point == pointToSearch)
{
return true;
}
}
}
}
return false;
}
private bool SearchInsidePolygons(PointLatLng pointToSearch)
{
var overlays = map.Overlays;
foreach (var overlay in overlays)
{
var polygons = overlay.Polygons;
foreach (var polygon in polygons)
{
if (polygon.IsInside(pointToSearch))
{
polygon.Fill = new SolidBrush(Color.FromArgb(120, 10, 200, 100));
LoadMap(pointToSearch);
AddMarker(pointToSearch, GMarkerGoogleType.lightblue);
map.RefreshMap();
return true;
}
}
}
return false;
}
}