I'm working on some software that does its calcs. and then starts up a new Firefox browser window passing the OSM URL and the relevant Lat. and Lon. parameters, e.g. http://www.openstreetmap.org/?lat=52.1917&lon=-1.7073&zoom=12

However nothing from the first ampersand onwards appears in the Firefox address bar, and Firefox just displays the last OSM map view viewed in Firefox, regardless of the actual Lat. in the address bar. Have tried executing the full command (i.e. that issued by my software) from the command prompt in the "DOS window", e.g... "C:\Program Files\Mozilla Firefox\firefox.exe" -new-tab http://www.openstreetmap.org/?lat=52.1917&lon=-1.7073&zoom=12 and the error messages I get are 'lon' is not recognized as an internal or external command, operable program or batch file. 'zoom' is not recognized as an internal or external command, operable program or batch file.

So it seems to me that WinXP is doing some parsing of the parameter string being passed to Firefox and only actually passing the "lat" parameter to Firefox.

I tried escaping the ampersands with %26 and the whole parameter string then gets through to Firefox but the OSM server (or Firefox?) seems not to recognise the escaped ampersands, thereby displaying the last map shown. I've tried with a semicolon as an alternative delimiter (which, I believe, is supposed to be a valid delimiter) and also the comma, but they just display the last map shown as described above.

Regular URLs without the ampersand, e.g. a tile URL (http://tile.openstreetmap.org/12/2028/1349.png), work fine.

It seems the required ampersand in the query parameter is tripping me up via WinXP! Any ideas on a resolution? Ta!

asked 25 Oct '12, 16:38

vagabond's gravatar image

vagabond
1954510
accept rate: 0%

closed 25 Oct '12, 16:57

SomeoneElse's gravatar image

SomeoneElse ♦
32.3k63335756

The question has been closed for the following reason "Question is off-topic or not relevant" by SomeoneElse 25 Oct '12, 16:57


Not that it's anything to do with OSM, but you need to put quotes around the address like you did around the program:

"C:\Program Files\Mozilla Firefox\firefox.exe" -new-tab "http://www.openstreetmap.org/?lat=52.1917&lon=-1.7073&zoom=12"

If you don't do that Windows will try and parse the command line rather than just passing it to Firefox.

permanent link

answered 25 Oct '12, 16:56

SomeoneElse's gravatar image

SomeoneElse ♦
32.3k63335756
accept rate: 15%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×25
×19
×2
×1

question asked: 25 Oct '12, 16:38

question was seen: 3,320 times

last updated: 25 Oct '12, 16:57

powered by OSQA