jcolebrand
jcolebrand

Reputation: 16025

Can I limit users to a specific range and zoom level on Bing Maps?

Similar to Can I limit users to a specific range and zoom level on Google Maps? except with Bing Maps.

I don't see anything in the API for it specifically, so I'm not sure that it is easily done without overriding some method (and I don't know which one at that). I'm only working in javascript, not silverlight or any serverside technology.

Upvotes: 2

Views: 1195

Answers (1)

SavoryBytes
SavoryBytes

Reputation: 36236

It can be done, but they don't make it easy. You need to listen to the mouse move event.

function LimitMove(e)
  {
     if (/* is map inside valid bounds check */)
     {
         return true; //true means we will handle the event (do nothing)
     }
     return false; //false means let the map do the default action (move)
  }

map.AttachEvent("onmousemove", LimitMove);

Upvotes: 1

Related Questions