Merge pull request #4114 from rockandror/map_fix
Get map center longitude from correct place
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
markerLatitude = dataCoordinates.lat;
|
markerLatitude = dataCoordinates.lat;
|
||||||
markerLongitude = dataCoordinates.long;
|
markerLongitude = dataCoordinates.long;
|
||||||
mapCenterLatitude = dataCoordinates.lat;
|
mapCenterLatitude = dataCoordinates.lat;
|
||||||
mapCenterLongitude = dataCoordinates.lat;
|
mapCenterLongitude = dataCoordinates.long;
|
||||||
} else {
|
} else {
|
||||||
mapCenterLatitude = $(element).data("map-center-latitude");
|
mapCenterLatitude = $(element).data("map-center-latitude");
|
||||||
mapCenterLongitude = $(element).data("map-center-longitude");
|
mapCenterLongitude = $(element).data("map-center-longitude");
|
||||||
|
|||||||
@@ -283,12 +283,14 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
|
|||||||
do_login_for(user) if management
|
do_login_for(user) if management
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Should display map on #{mappable_factory_name} show page", :js do
|
scenario "Should display map and marker on #{mappable_factory_name} show page", :js do
|
||||||
arguments[:id] = mappable.id
|
arguments[:id] = mappable.id
|
||||||
|
|
||||||
visit send(mappable_show_path, arguments)
|
visit send(mappable_show_path, arguments)
|
||||||
|
|
||||||
expect(page).to have_css(".map_location")
|
within ".map_location" do
|
||||||
|
expect(page).to have_css(".map-icon")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Should not display map on #{mappable_factory_name} show when marker is not defined", :js do
|
scenario "Should not display map on #{mappable_factory_name} show when marker is not defined", :js do
|
||||||
|
|||||||
Reference in New Issue
Block a user