I have multiple places store in my db . places contain (Longitude,latitude,Name,Website,phone,...) . I want to add these place to google maps using c# method. How can I Send place to google maps ?
Asked
Active
Viewed 3,176 times
1
-
Google maps is a JavaScript library. – Linda Lawton - DaImTo Jan 30 '19 at 11:20
-
can i return list of data from database and send it to JavaScript method which send these data to google maps ? – Omar Seleim Jan 30 '19 at 11:32
-
This question isn't worded as clearly as it could be ... even though it's an interesting topic. :) – KevinVictor Dec 07 '21 at 15:36
1 Answers
1
You might want to have a look at this one:
Calling JavaScript Function From CodeBehind
There are two solutions:
Use the JS
In short terms:
- You do the Google API requests still via JS
- Your C# Backend is doing the Database calls and
- Routes the parameters to the JS via the above
I think that should work without a problem.
Send API Requests purely by C#
The Google Maps API can, of course be requested by you by sending out the JSON calls.
This post gives guidance in that: google maps API for C#
-
-
@OmarSeleim What do you mean by "missing place"? In generally, google maps' API wants you to set the longitude and latitude as parameters in the calls. That's described here: https://developers.google.com/maps/documentation/javascript/tutorial?hl=de – Kaibear Jan 30 '19 at 12:32
-
I want to add places with my information (name of place XX , website XX.com,Phone Number : 015647) to google map so when someone search on google map about XX my place show with description website and phone – Omar Seleim Jan 30 '19 at 13:04
-
@OmarSeleim you mean searches via google itself? Not via any of your software? That's nothing development related. Please follow this guidance from google: https://support.google.com/maps/answer/6320846?co=GENIE.Platform%3DDesktop&hl=en Just login, and fill out the form for the respective address. – Kaibear Jan 30 '19 at 13:37
-
is there is not any way to send list of data to api to add them in one time? – Omar Seleim Jan 30 '19 at 14:01
-
I do not think so. Google's Maps API does only list Get-Requests from Google's database of places. Creating places does not seem to be included, which is okay, as there is an auditing behind that, I think. – Kaibear Jan 30 '19 at 14:14