aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
Commit message (Collapse)AuthorAgeLines
* Show loading indicator when loading pinspezholio2017-03-17-11/+6
|
* Display nearby candidate reports when marking as duplicateDave Arter2016-12-13-36/+50
| | | | | | | | - Use Problem->pin_data for single report page - Promote markers_highlight to fixmystreet.maps API We want to highlight map pins on the duplicate report selection UI, so let's use what's already there instead of writing something new. - Make sure duplicate report pins aren’t draggable
* Load OpenLayers stylesheet directly, not via JS.Matthew Somerville2016-12-09-0/+1
| | | | | This lets us version and cache-bust it as necessary, plus let browser decide how to load it, we're always going to need it.
* Add sort order options to list pages.Matthew Somerville2016-11-04-13/+17
| | | | | | | | Includes newest, oldest, least/most recently updated, and most comments. The default remains the same, which is last updated on /reports, and newest on /my and /around (the latter plus not-in-view sorted-by-distance ones).
* Merge branch 'reports-area-as-a-hole'Matthew Somerville2016-10-24-8/+51
|\
| * Invert display of areas on body pages.Matthew Somerville2016-10-21-8/+51
| | | | | | | | | | This makes it easier to use the map, as the land outside the area is shaded, rather than the area itself.
* | Store and use initial URL to fix JavaScript bugs.Matthew Somerville2016-10-21-1/+1
|/ | | | | | | | | | | | | If you were on a body page, selected a report, then another report, the "Back to all reports" link then had an incorrect URL. Also, going "Back to all reports" after one report would fetch an incorrect Ajax query of reports to show (as the URL had not yet been updated). Both of these are fixed by storing the URL on page load, and using that for the "Back to all reports" link and the URL used by the Ajax call. There is still an issue with the URL shown if you filter, then select a report, then click "Back to all reports", but the contents are okay.
* Fix map pin clicking in IE11.Matthew Somerville2016-10-21-3/+3
| | | | | | It turns out that whilst IE9+ defines MouseEvent, it's not in the form that can be used as a constructor until Edge. To fix this we check that MouseEvent is a function before using it as one.
* Update pagination when status/categories changed.Matthew Somerville2016-10-18-0/+4
|
* Add ajax pin fetching to reports/my pages.Matthew Somerville2016-10-14-0/+25
| | | | | This matches the behaviour on /around, and prevents a refresh when changing the state or category filters.
* Improve history API URL when query string empty.Matthew Somerville2016-10-14-1/+11
|
* Allow multiple selections in report list filter.Zarino Zappia2016-10-13-9/+35
| | | | | | This lets people filter by multiple categories or states. It uses our jQuery multi-select plugin to turn the <select multiple>s into little overlay lists of checkboxes. HTML5 history is also supported.
* Add inspector report detail viewDave Arter2016-09-06-0/+55
| | | | | | | | | | | | | Users with the `report_inspect` permission can click a new 'inspect' button on a report page to input more detailed problem information into a new form that appears in a column alongside the report detail. - Inspector data is stored in problem's 'extra' field - Report category/state can be edited - Location can be changed by dragging the pin or HTML5 geolocation (Factored out Zurich admin pin drag into own function) For mysociety/fixmystreetforcouncils#22
* Make sure PanZoom works in older OpenLayers.Matthew Somerville2016-08-19-34/+8
| | | | | Remove unused code that is same as upstream (it was added when the map middle didn't match the visible middle), and the world button.
* Move non-JavaScript pan/zoom to same as with JS.Matthew Somerville2016-08-17-7/+18
| | | | | No need to use old OpenLayers PanZoom defaults, or load images we don't want to use.
* Factor out most inline JavaScript.Matthew Somerville2016-08-16-10/+0
| | | | | No need for a special no-map case in the filters case, as all pages now have fixmystreet.page set if needed.
* Do HTML class and JS variable setting ASAP.Matthew Somerville2016-08-16-1/+1
|
* Work correctly for alt-click/cmd-click etc.Matthew Somerville2016-07-14-3/+30
|
* Fix a few JavaScript issues with reports pages.Matthew Somerville2016-07-12-1/+6
| | | | | | | Don't stringify pin problem ID, as get_marker_by_id assumes it will be an integer; only activate the bounding box strategy if it exists; make sure a refresh of the markers happens when going back to the list; set the Back link on a pulled-in report to the current URL.
* Move to using pushState for new report.Zarino Zappia2016-07-11-30/+31
| | | | | Update the URL whenever location of pin is updated (first time, drag, or reclick), make sure it works when clicking back.
* Load in report details on around page via ajax.Zarino Zappia2016-07-11-7/+44
| | | | | | | | | | | Include URL changing, using history.pushState. Show a larger marker icon for the selected report. Make sure title is updated, and correct sub_map_links are shown. The /report/new template is now wrapped in a <div id="side-form"> rather than <div id="side"> for consistency with the /around page, which keeps display_all_reports_in_area() simpler, because it can always assume "#side" means "list of reports".
* Simplify "rap-notes" visibility togglingZarino Zappia2016-07-11-5/+0
| | | | | On mobile, the notes in `#report-a-problem-sidebar` are hidden by default, and can be toggled using the `.rap-notes-trigger`.
* Only match the actual ID, not same-ending others.Matthew Somerville2016-07-11-2/+2
|
* Increase opacity a bit on non-hovered pins.Matthew Somerville2016-07-11-1/+1
|
* Tidy up JavaScript functions.Matthew Somerville2016-07-11-537/+442
| | | | Split big functions into smaller more descriptive ones.
* Move most JavaScript mobile map changes to CSS.Zarino Zappia2016-07-01-6/+0
|
* Don't update the map pins if a new report started.Matthew Somerville2016-06-17-0/+11
|
* Absolutely position map pages.Zarino Zappia2016-06-03-31/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the page layout and code. We add a new #map_sidebar for sidebar positioning, and a $mappage-header-height (defaulting to 4em) variable. We no longer need: * position_map_box; * map_fix; * special visual centre calculation; or * custom pan zoom positioning. As the sidebar now scrolls by itself and nothing can extend outside: * The big-green-banner is set to 100% width (with negative margins no longer required); * For cobrands that have an overhanging sidebar (e.g. Zurich), we add a .with-notes variant that adds a second column to the sidebar, perfect for containing secondary notes about the form. The resizing of the banner also required some tweaking to the size of the chevron-white SVG images. Update the $.fn.drawer() method for the new layout. Works well in IE7+8, and degrades gracefully in IE6. For IE7, we remove the existing z-index hacks, and put a new, simpler, one in, and fix a CSS bug that was hiding the map. Various cobrands are updated to adapt to the changes.
* Centre map on pin location when creating a report.Zarino Zappia2016-06-01-29/+19
| | | | | | | Always centre the map on the new point when creating a new report. This will be helpful when the map element can change width to accommodate the .with-notes variant, is easier than the previous method, and feels very natural.
* Allow scroll wheel to zoom map.Zarino Zappia2016-06-01-3/+0
|
* Stop PanZoom giving controls hard-coded positions.Zarino Zappia2016-06-01-0/+16
| | | | | We previously used !important to override them in the CSS, but better to prevent them being set in the JavaScript in the first place.
* Increase pixel tolerance of map click handler.Matthew Somerville2016-05-17-1/+1
|
* Preserve category when clicking elsewhere on mapDave Arter2016-03-29-0/+4
| | | | | | | Because the list of categories is reloaded when changing the location of an in-progress report, it was possible for the category the user had selected to be un-selected. This improves the situation by re-selecting that category if it appears in the new list.
* Make sure top of reporting form is shown.Matthew Somerville2016-03-09-0/+1
| | | | | | If the list of reports was scrolled and then the map was clicked, the form would be pre-scrolled down. It now makes sure to scroll the form to the top. Fixes #787.
* Remove auto-scrolling of sidebar on pin hover.Matthew Somerville2016-03-09-20/+0
| | | | | This was added along with pin/sidebar highlighting in b71d042e, but has proved distracting/confusing.
* Really stop map strategy update firing too often.Matthew Somerville2016-02-09-0/+12
| | | | | | | It turns out the strategy was still firing even with correctly rounded co-ordinates from getMapBounds, as there were still rounding errors introduced by the two differing ways of calculating the map bounds. We override one function to always equal the results of the other method.
* Stop map strategy update firing too often.Matthew Somerville2016-02-09-1/+16
|
* Clearer relationship between map pins/list items.Zarino Zappia2016-02-09-29/+116
| | | | | | | | | | | | | | | | | | | Hovering over map pins highlights the relevant item from the sidebar beside the map. And hovering a sidebar item highlights the relevant map pin. Clicking a map pin takes you directly to the relevant report page, just like clicking an item in the sidebar. This means the OpenLayers popup "balloon" no longer appears on clicking a pin, and has been removed entirely. To make customisation of the list item hover colour easier, it has been abstracted out into a SCSS variable that cobrand authors should override (as the fixmystreet.com cobrand does) or leave at its default light grey colour. Fixes #1094.
* Add state/category filters to base cobrand.Matthew Somerville2015-10-07-4/+1
| | | | | | | This removes the on map/nearby tabs, replacing them with one combined list. The styling is moved to the base, so that it is used on mobile too. A closed option is added to the existing dropdown, and the base/fixmystreet my templates are also combined. Fixes #1141.
* Update JavaScript to handle right-to-left layout.Matthew Somerville2015-09-17-9/+1
|
* If only one category, be sure to fetch extras for it.Matthew Somerville2015-07-28-2/+8
|
* Rename map filtering GET param, remove unnecessary querySteven Day2015-06-29-14/+7
|
* Refresh map as soon as filters are changed on /my and /reportsDave Arter2015-06-29-0/+6
|
* Refresh map pins when status dropdown changes, if presentSteven Day2015-06-29-4/+7
|
* Pre-fill category on report form if map pins were filteredDave Arter2015-06-29-0/+14
|
* Change map pins with category fieldSteven Day2015-06-29-2/+17
| | | | | When the category dropdown is changed the map pins are re-requested from the server with the correct category in the URL.
* Add category filtering support to /ajax via 'category' GET paramDave Arter2015-06-29-1/+25
|
* Resize map pins based on zoom levelDave Arter2015-06-29-3/+46
| | | | When zoomed out, a smaller icon is used to stop the map getting too overcrowded.
* Support Stamen toner-lite and Bing Maps tiles.Matthew Somerville2015-02-23-1/+4
|
* Merge remote-tracking branch 'mhalden/fiksgatami-js-fiks'Matthew Somerville2015-01-13-3/+3
|\