1

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 ?

Omar Seleim
  • 21
  • 1
  • 6

1 Answers1

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:

  1. You do the Google API requests still via JS
  2. Your C# Backend is doing the Database calls and
  3. 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#

Community
  • 1
  • 1
Kaibear
  • 95
  • 1
  • 2
  • 15
  • How can I add missing place on google map using Javascript ? – Omar Seleim Jan 30 '19 at 12:22
  • @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