Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Bing Maps API - Why JavaScript??

Bing Maps API - Why JavaScript??

Scheduled Pinned Locked Moved The Lounge
csharpjavascripthtmlasp-nethardware
27 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marco Bertschi
    wrote on last edited by
    #1

    I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .

    P L M L B 8 Replies Last reply
    0
    • M Marco Bertschi

      I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      And what would you have in this user control? As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook. Then what do MS do for those who don't like ASP.NET? Do they then provide controls for people who prefer MVC? What about PHP developers (no picking on them please, this is serious)?

      *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

      "Mind bleach! Send me mind bleach!" - Nagy Vilmos

      CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

      M 1 Reply Last reply
      0
      • P Pete OHanlon

        And what would you have in this user control? As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook. Then what do MS do for those who don't like ASP.NET? Do they then provide controls for people who prefer MVC? What about PHP developers (no picking on them please, this is serious)?

        *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

        "Mind bleach! Send me mind bleach!" - Nagy Vilmos

        CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

        M Offline
        M Offline
        Marco Bertschi
        wrote on last edited by
        #3

        Pete O'Hanlon wrote:

        As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook.

        I don't think that this user control has to provide all the possible map functions. It might be good enough to have just the basic functions of a map (set pins, set zoom, set view mode and set map center) and if anyone wants to have another function he can add them by polymorphism...

        Pete O'Hanlon wrote:

        Then what do MS do for those who don't like ASP.NET?

        I just picked out an ASP.Net user control because Bing Maps and ASP.Net are both MS products. What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...

        Pete O'Hanlon wrote:

        What about PHP developers (no picking on them please, this is serious)?

        I don't know since I am no PHP dev... But there is maybe another solution than JavaScript?

        P K 2 Replies Last reply
        0
        • M Marco Bertschi

          Pete O'Hanlon wrote:

          As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook.

          I don't think that this user control has to provide all the possible map functions. It might be good enough to have just the basic functions of a map (set pins, set zoom, set view mode and set map center) and if anyone wants to have another function he can add them by polymorphism...

          Pete O'Hanlon wrote:

          Then what do MS do for those who don't like ASP.NET?

          I just picked out an ASP.Net user control because Bing Maps and ASP.Net are both MS products. What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...

          Pete O'Hanlon wrote:

          What about PHP developers (no picking on them please, this is serious)?

          I don't know since I am no PHP dev... But there is maybe another solution than JavaScript?

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          I'm sorry, but I disagree. Implementing the API using JavaScript is not that difficult, and the benefits of a pre-canned control that does only the basics is not enough to justify it. The thing that I'm reading here is that you aren't comfortable with JavaScript development. If you're doing web development, then it's worth your while learning it - you could even us something like TypeScrupt, or CoffeeScript if you like.

          *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

          "Mind bleach! Send me mind bleach!" - Nagy Vilmos

          CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

          M 1 Reply Last reply
          0
          • M Marco Bertschi

            I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .

            L Offline
            L Offline
            lewax00
            wrote on last edited by
            #5

            JavaScript is the most sensible choice, it allows it to be used by the greatest number of websites. And if you're doing web development, you're going to have to use JavaScript at some point in time, might as well get used to it.

            1 Reply Last reply
            0
            • P Pete OHanlon

              I'm sorry, but I disagree. Implementing the API using JavaScript is not that difficult, and the benefits of a pre-canned control that does only the basics is not enough to justify it. The thing that I'm reading here is that you aren't comfortable with JavaScript development. If you're doing web development, then it's worth your while learning it - you could even us something like TypeScrupt, or CoffeeScript if you like.

              *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

              "Mind bleach! Send me mind bleach!" - Nagy Vilmos

              CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

              M Offline
              M Offline
              Marco Bertschi
              wrote on last edited by
              #6

              Pete O'Hanlon wrote:

              The thing that I'm reading here is that you aren't comfortable with JavaScript development.

              You kinda nailed it. To be honest, it is not the JavaScript dev thing which annoys me, it is the fact that there is not a huge support for it built-in in VS 2010... Maybe I am just a bit weak from the comfortable .Net Environment I am provided with :~ :sigh: In fact I think JavaScript is basically a good thing but it should be easier to develop - Yes, Coffe Script does it make easier (at least at the first quick glance i had one their homepage), I just haven't known it before and I am truly sorry for this fault :~:~ And I'll have a look at typescript too, thanks a lot! :thumbsup:

              K P M 3 Replies Last reply
              0
              • M Marco Bertschi

                Pete O'Hanlon wrote:

                As soon as you implement a control, you take the responsibility for providing ALL the functionality that people need, or you have to compromise features, in which case you're back to implementing JavaScript, but the control has to be uber-flexible to provide every possible hook.

                I don't think that this user control has to provide all the possible map functions. It might be good enough to have just the basic functions of a map (set pins, set zoom, set view mode and set map center) and if anyone wants to have another function he can add them by polymorphism...

                Pete O'Hanlon wrote:

                Then what do MS do for those who don't like ASP.NET?

                I just picked out an ASP.Net user control because Bing Maps and ASP.Net are both MS products. What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...

                Pete O'Hanlon wrote:

                What about PHP developers (no picking on them please, this is serious)?

                I don't know since I am no PHP dev... But there is maybe another solution than JavaScript?

                K Offline
                K Offline
                Keith Barrow
                wrote on last edited by
                #7

                Marco Bertschi wrote:

                I don't think that this user control has to provide all the possible map functions.

                As soon as you start cutting functionality, people will complain about it. Creating a fully featured control will be approximately as complex as just using the JavaScript in the first place. Not only that, there'd need to be one for ASP.NET Forms, one for ASP.NET MVC one for PHP etc.

                Marco Bertschi wrote:

                What I basically want to say is that it would be great to have something like a BingMap-control in the VS toolbar to do the stuff I am doing in JavaScript...

                You could implement this yourself and make it available for people to re-use, I dare say people would take it up. It will still have the same problem as above though, and wouldn't be a universal solution like the Javascript API.

                Marco Bertschi wrote:

                But there is maybe another solution than JavaScript?

                There are other (not necessarily better) solutions. Fundamentally the API will just be making a web request call, you could implement c# to re-create this. There are also SOAP services[^] you could consume, though I guess the API sits on more a RESTful URL approach (don't know, haven't tried). These could be used to create a control such as the one you describe.

                Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                -Or-
                A Dead ringer for Kate Winslett[^]

                1 Reply Last reply
                0
                • M Marco Bertschi

                  Pete O'Hanlon wrote:

                  The thing that I'm reading here is that you aren't comfortable with JavaScript development.

                  You kinda nailed it. To be honest, it is not the JavaScript dev thing which annoys me, it is the fact that there is not a huge support for it built-in in VS 2010... Maybe I am just a bit weak from the comfortable .Net Environment I am provided with :~ :sigh: In fact I think JavaScript is basically a good thing but it should be easier to develop - Yes, Coffe Script does it make easier (at least at the first quick glance i had one their homepage), I just haven't known it before and I am truly sorry for this fault :~:~ And I'll have a look at typescript too, thanks a lot! :thumbsup:

                  K Offline
                  K Offline
                  Keith Barrow
                  wrote on last edited by
                  #8

                  This is a skill you need as a webdev. Much of the technology is heading (or headed) this way. I had a bit of a culture shock regarding this myself a couple of years ago. I'd principally been involved with internal ASP.NET apps (mostly the back end at that), which have been JavaScript-light. Not only that but, as you describe the lack of tooling made things hard so I rarely relished the thought of working with JavaScript. A good go at MVC3 (especially in conjunction with AJAX-y stuff & jQuery) was a real eye-opener, now I regularly do things with ease that only a year or two ago I would have considered impractical due to the effort required. I've not gotten any cleverer, just the tools are out there to do this stuff, it really is worth learning.

                  Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                  -Or-
                  A Dead ringer for Kate Winslett[^]

                  M 1 Reply Last reply
                  0
                  • M Marco Bertschi

                    I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .

                    M Offline
                    M Offline
                    Mark_Wallace
                    wrote on last edited by
                    #9

                    I dare say that if you looked up the number of people using JavaScript and the number of people using ASP.Net, you'd be able to guess the reason.

                    I wanna be a eunuchs developer! Pass me a bread knife!

                    1 Reply Last reply
                    0
                    • M Marco Bertschi

                      I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      I'm not trying to defend them here, but have you ever seen a maps API that didn't suck?

                      1 Reply Last reply
                      0
                      • M Marco Bertschi

                        Pete O'Hanlon wrote:

                        The thing that I'm reading here is that you aren't comfortable with JavaScript development.

                        You kinda nailed it. To be honest, it is not the JavaScript dev thing which annoys me, it is the fact that there is not a huge support for it built-in in VS 2010... Maybe I am just a bit weak from the comfortable .Net Environment I am provided with :~ :sigh: In fact I think JavaScript is basically a good thing but it should be easier to develop - Yes, Coffe Script does it make easier (at least at the first quick glance i had one their homepage), I just haven't known it before and I am truly sorry for this fault :~:~ And I'll have a look at typescript too, thanks a lot! :thumbsup:

                        P Offline
                        P Offline
                        Pete OHanlon
                        wrote on last edited by
                        #11

                        I rely on jQuery a lot (as well as things such as Knockout.js) to help tame JavaScript. It's amazing how much you can simplify JavaScript through jQuery.

                        *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                        "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                        CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                        M F 2 Replies Last reply
                        0
                        • K Keith Barrow

                          This is a skill you need as a webdev. Much of the technology is heading (or headed) this way. I had a bit of a culture shock regarding this myself a couple of years ago. I'd principally been involved with internal ASP.NET apps (mostly the back end at that), which have been JavaScript-light. Not only that but, as you describe the lack of tooling made things hard so I rarely relished the thought of working with JavaScript. A good go at MVC3 (especially in conjunction with AJAX-y stuff & jQuery) was a real eye-opener, now I regularly do things with ease that only a year or two ago I would have considered impractical due to the effort required. I've not gotten any cleverer, just the tools are out there to do this stuff, it really is worth learning.

                          Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                          -Or-
                          A Dead ringer for Kate Winslett[^]

                          M Offline
                          M Offline
                          Marco Bertschi
                          wrote on last edited by
                          #12

                          Thanks god I am just learning this web stuff beside my job (where I do desktop app development) in my free time to increase my knowledge. As I see it JavaScript became a victim of its own success - Whenever I search the web for a solution for a problem I encounter thousands of possible solutions and most of them are outdated an not usable for me anymore (just because they throw errors to my head, even when I invest time trying to get them working).

                          1 Reply Last reply
                          0
                          • P Pete OHanlon

                            I rely on jQuery a lot (as well as things such as Knockout.js) to help tame JavaScript. It's amazing how much you can simplify JavaScript through jQuery.

                            *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                            "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                            CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                            M Offline
                            M Offline
                            Marco Bertschi
                            wrote on last edited by
                            #13

                            Pete O'Hanlon wrote:

                            It's amazing how much you can simplify JavaScript through jQuery.

                            Do you have any suggestions how to start best with this stuff (books, webpages etc...)?

                            K P 2 Replies Last reply
                            0
                            • M Marco Bertschi

                              Pete O'Hanlon wrote:

                              It's amazing how much you can simplify JavaScript through jQuery.

                              Do you have any suggestions how to start best with this stuff (books, webpages etc...)?

                              K Offline
                              K Offline
                              Keith Barrow
                              wrote on last edited by
                              #14

                              I recently worked through Head First jQuery[^] as it's become so ubiquitous I wanted something a little more thorough than the various quickstart tutorials. You could take a look at this[^] for starters, just to contradict myself :)

                              Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                              -Or-
                              A Dead ringer for Kate Winslett[^]

                              M 1 Reply Last reply
                              0
                              • M Marco Bertschi

                                Pete O'Hanlon wrote:

                                It's amazing how much you can simplify JavaScript through jQuery.

                                Do you have any suggestions how to start best with this stuff (books, webpages etc...)?

                                P Offline
                                P Offline
                                Pete OHanlon
                                wrote on last edited by
                                #15

                                Syncfusion do a series of free eBooks[^] that are quite good.

                                *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                                "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                                CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                M 1 Reply Last reply
                                0
                                • K Keith Barrow

                                  I recently worked through Head First jQuery[^] as it's become so ubiquitous I wanted something a little more thorough than the various quickstart tutorials. You could take a look at this[^] for starters, just to contradict myself :)

                                  Sort of a cross between Lawrence of Arabia and Dilbert.[^]
                                  -Or-
                                  A Dead ringer for Kate Winslett[^]

                                  M Offline
                                  M Offline
                                  Marco Bertschi
                                  wrote on last edited by
                                  #16

                                  Bookmarked. Thanks :thumbsup:

                                  1 Reply Last reply
                                  0
                                  • P Pete OHanlon

                                    Syncfusion do a series of free eBooks[^] that are quite good.

                                    *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                                    "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                                    CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                    M Offline
                                    M Offline
                                    Marco Bertschi
                                    wrote on last edited by
                                    #17

                                    Bookmarked too. Thanks a lot :thumbsup::thumbsup:

                                    1 Reply Last reply
                                    0
                                    • M Marco Bertschi

                                      I am working currently on a project which needs to display an address in a map. As far as I am not a total Google Groupie :^) (I like the webmaster tools and stuff but not the Maps API) I decided to use the Bing Maps API. And i simply cannot understand why Microsoft forces you to use JavaScript and can't simply offer a ASP.Net user control (which would be much safer because you wouldn't have to expose your Maps API key). And as far is I know have all the map APIs only a JavaScript, a mobile and a HTML 5 API. And i like UserControls ;P ... However, I have now a file which is called Map.html (Do clickety here) embedded in an iFrame. Maybe I am going to develop an user control for ASP.Net later. But however, I don't like this bunch of javascript stuff :( .

                                      B Offline
                                      B Offline
                                      BobJanova
                                      wrote on last edited by
                                      #18

                                      JavaScript is the standard way to plug web components together, if they're being loaded from different domains. An ASP.net user control would simply be encapsulating the JavaScript, the wrapper div and the CSS. It wouldn't protect your key, it would still have to have that in some script that the user could find – presumably keys are linked to a domain or something similar to protect against abuse of this. If you want a user control, though, you could create one and submit it to a public repository (maybe a CodeProject article?) so that other people can have the convenience if they want.

                                      1 Reply Last reply
                                      0
                                      • P Pete OHanlon

                                        I rely on jQuery a lot (as well as things such as Knockout.js) to help tame JavaScript. It's amazing how much you can simplify JavaScript through jQuery.

                                        *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                                        "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                                        CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                        F Offline
                                        F Offline
                                        Florin Jurcovici
                                        wrote on last edited by
                                        #19

                                        Pete O'Hanlon wrote:

                                        It's amazing how much you can simplify JavaScript through jQuery.

                                        Surely that must have been a type - you meant DOM manipulation, rather than the Javascript language, right?

                                        P 1 Reply Last reply
                                        0
                                        • F Florin Jurcovici

                                          Pete O'Hanlon wrote:

                                          It's amazing how much you can simplify JavaScript through jQuery.

                                          Surely that must have been a type - you meant DOM manipulation, rather than the Javascript language, right?

                                          P Offline
                                          P Offline
                                          Pete OHanlon
                                          wrote on last edited by
                                          #20

                                          I did mean DOM manipulation, but the usage of JavaScript was deliberate in that sentence. It was meant to convey the fact that jQuery could help to remove the "scary" parts for newbie JavaScript developers because so much of the heavy lifting is done for you - for instance, event handler manipulation is greatly eased with jQuery, as is features such as AJAX and usage of JSon.

                                          *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

                                          "Mind bleach! Send me mind bleach!" - Nagy Vilmos

                                          CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups