Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7918733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:36:30+00:00 2026-06-03T15:36:30+00:00

I am thinking about developing a backbone application, but I am not sure if

  • 0

I am thinking about developing a backbone application, but I am not sure if I am thinking about it the right way.

This will be my first backbone application. Basically, I want to develop a simple app that will have a google map as its “main” view.

The idea is to fetch location information from an API into a model, let’s say Marker, and these markers will be shown on the map.

I am not sure how to connect the markers to the map view:

  1. Should the map view have an addMarker() function?
  2. Or should the marker’s render method add the marker to the map?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:36:31+00:00Added an answer on June 3, 2026 at 3:36 pm

    How about creating a Collection of markers and passing it to the initialize function in your view?

    This would allow you to bind the change event to update the map whenever the marker collection changes. Then, whenever you add a marker to the collection, the map view will catch the change in the collection and be able to add the marker and adapt itself as needed to accomodate.

    For instance, create a view on these lines:

    // in Backbone.View
    initialize: function (opts) {
      _.bindAll(this);
      this.markers = opts.markers;
      this.markers.on('change', this.render);
    },
    
    render: function () {
      // create or update the map
    }
    

    When you want to initialize the view, you could now use something like this:

    var markers = new MyApp.MarkerCollection(),
        view = new MyApp.MapView({ markers: markers });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am thinking about developing an application that will, on a six core machine,
I'm thinking about developing an iPhone/Android app which will include a server side. For
Been thinking about this for hours now. Im building a simple slideshow application, where
With Google TV around the corner, I started thinking about developing a web application
I'm developing a web based mobile application and I was thinking about the default
I am developing an app using phonegap for Android. I want this mobile application
I'm developing an application and am thinking about releasing it open source. Is it
I am thinking about developing a fairly simple facebook application which i have modelled
I am thinking about developing a game for xbox kinect, but it is a
I am thinking about developing Winforms application that would use c library to preform

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.