1

I just started working with the OpenGeo Suite. I'd really like to use it for a County web map, but have a couple questions...

1) Is there a way to add a lat/lon or other X/Y location to the URL and have the map center and zoom to the point? Something like "?lat=46.265&lon=-90.206&zoom=7" at the end of the URL.

2) Is the Query tool available in a published map? It's not in the Choose Tools window when publishing.

Thanks.

=== UPDATE ===

I will drop part 2 and stick with part 1.

I guess I forgot to mention the crucial bit that I'm working in GeoExplorer. I did have the tag, but don't fault anybody for missing it.

The bounding box isn't working in GeoExplorer. I have the map published in an iframe. Here's a screenshot of the test page without the bbox... i.imgur.com/Wc022Ee.jpg.

Here's a screenshot with the bbox... i.imgur.com/7MES4cn.jpg. That's just a blank map that hides behind the real map and only shows up when the real map doesn't.

I do have a correct bbox... i.imgur.com/MbAOgVD.jpg in the code.

(I guess I need a higher rep before I can add more direct links, so you'll need to copy paste the image URLs if you want to see them.)

Here's the source behind the page...

<html>
  <head>
    <style type="text/css">
      body { margin:   0; overflow: hidden; }`
      #mapfr { height: 80%; margin: 0 auto; width: 90%; display: block; }
    </style>
  </head>
  <body>
    <h1>Iron County Test Map</h1>
    <iframe id="mapfr"
    src="http://192.168.1.13:8080/geoexplorer/viewer/#maps/1" frameborder="0"></iframe>
    <p>This is a test map, version T-001.  A disclaimer might go here.</p>
  </body>
</html>

I tried putting the "?bbox=" at the end of the "src=.../1".

Thanks for any help. And thanks for the welcome.

  • 2
    you will get better answers if you only ask one question at a time. see gis.stackexchange.com/help/how-to-ask – Ian Turton Jul 9 '13 at 6:20
  • Welcome to GIS SE! What @iant said. The problem with asking two questions at a time is that you might get answers that are both right and wrong ( i.e. answer to first question is right but the answer to the second one is wrong). – R.K. Jul 9 '13 at 9:44
3

Re 1: You can use the bbox query parameter. It takes coordinates in map projection (Web Mercator by default). So e.g. ?bbox=150000,670000,180000,880000

Re 2: The Query tool is only available in the composer, not the viewer. In the exported url, change /viewer to /composer to see it.

  • Thanks. The /composer switch works. I'll have to decide whether I want users to have that much control over the map, though. I updated the original post with info about the bounding box. – Nemo Jul 9 '13 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.