Not Logged In Log In   Sign Up   Points Leaders
Follow Us    5:43 PM

Message Forum - Read Message

Category: Suggest a GasBuddy improvement > Topics Add to favorite topics   Post new topicPost New Topic
Author Topic: Put a 'Named Anchor' on all Map Gas Prices pages Back to Topics
movrshakr

Champion Author
Florida

Posts:1,400
Points:1,851,940
Joined:Jan 2008
Message Posted: Feb 3, 2011 1:58:50 PM

Suggest you put a named anchor on all MGP pages at the top of the map graphic.

This will allow us to create a url (say for a bookmark) that will open the map page and jump it down to display the map graphic with its top border at the top of the browser window.

Example: http://....url.../#maptop
[or]
http://....url.../#c1

or whatever name you choose for the named anchor.
REPLIES (newest first) Post a Reply
Profile Pic
movrshakr
Champion Author Florida

Posts:1,400
Points:1,851,940
Joined:Jan 2008
Message Posted: Dec 16, 2012 6:56:41 PM

.
To make that completely clear, adding

#ctl00_Content_MGP_pnlUSA

to the END of any url you are using to access an MGP page will put the map at the top of the loaded screen.

Major thanks to CampKohler for analyzing how to do this.

[Edited by: movrshakr at 12/16/2012 6:59:30 PM EST]
Profile Pic
CampKohler
Champion Author Sacramento

Posts:12,342
Points:1,946,705
Joined:May 2007
Message Posted: Dec 15, 2012 11:44:54 PM

After a year and a half of extensive research (or maybe a little less), there is a solution to displaying the map at the top of the viewport. There is a div tag just above the map on the page and it has an id parameter of "ctl00_Content_MGP_pnlUSA". This can be used as a fragment link in the same manner as an anchor tag.

For example, let's say you just got out and need to drain that 20-year-old premium from your tank and replace it with fresh stock from a nearby station. http://sactogasprices.com/Map_Gas_Prices.aspx?z=9&lat=38.686981&long=-121.167542&ft=C&tl=All#ctl00_Content_MGP_pnlUSA will do the trick.
Post a reply Back to Topics